Changeset 10396 for trunk/src


Ignore:
Timestamp:
Jan 15, 2004, 11:28:42 AM (22 years ago)
Author:
sandervl
Message:

KSO: Removed duplicate (and dangerous) checks on framewindows in a couple of enumerations (OSLibWinQueryClientWindow).

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibwin.cpp

    r10379 r10396  
    1 /* $Id: oslibwin.cpp,v 1.146 2004-01-11 12:03:15 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.147 2004-01-15 10:28:41 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    884884//******************************************************************************
    885885//******************************************************************************
    886 HWND OSLibWinQueryClientWindow(HWND hwndFrame)
    887 {
    888  HWND hwndClient = 0;
    889 
    890    if(((ULONG)WinSendMsg(hwndFrame, WM_QUERYFRAMEINFO, NULL, NULL)) & FI_FRAME)
    891           hwndClient = WinWindowFromID(hwndFrame, FID_CLIENT);
    892 
    893    return hwndClient;
    894 }
    895 //******************************************************************************
    896 //******************************************************************************
    897886BOOL OSLibWinEndEnumWindows(HWND hwndEnum)
    898887{
  • trunk/src/user32/oslibwin.h

    r10031 r10396  
    1 /* $Id: oslibwin.h,v 1.76 2003-04-23 18:00:58 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.77 2004-01-15 10:28:42 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4343HWND  OSLibWinCreateWindow(HWND hwndParent,ULONG dwWinStyle, ULONG dwOSFrameStyle,
    4444                           char *pszName, HWND Owner, ULONG fBottom,
    45                            ULONG id, BOOL fTaskList,BOOL fShellPosition, 
     45                           ULONG id, BOOL fTaskList,BOOL fShellPosition,
    4646                           DWORD classStyle, HWND *hwndFrame);
    4747
    48 BOOL  OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, 
     48BOOL  OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle,
    4949                           ULONG *OSFrameStyle);
    50 void  OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle, 
     50void  OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle,
    5151                          ULONG dwExStyle, ULONG dwOldWindowsStyle);
    5252
    5353DWORD OSLibQueryWindowStyle(HWND hwnd);
    5454
    55 BOOL  OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, 
    56                                     DWORD dwExStyle, HICON hSysMenuIcon, 
     55BOOL  OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle,
     56                                    DWORD dwExStyle, HICON hSysMenuIcon,
    5757                                    BOOL drawCloseButton, BOOL fClassIcon);
    5858BOOL  OSLibChangeCloseButtonState(HWND hwndFrame, BOOL State);
     
    281281
    282282BOOL  OSLibWinQueryWindowPos (HWND hwnd, PSWP pswp);
    283 void  OSLibMapSWPtoWINDOWPOS(PSWP pswp, PWINDOWPOS pwpos, PSWP pswpOld, 
     283void  OSLibMapSWPtoWINDOWPOS(PSWP pswp, PWINDOWPOS pwpos, PSWP pswpOld,
    284284                            int parentHeight, HWND hwnd);
    285 void  OSLibMapWINDOWPOStoSWP(struct tagWINDOWPOS *pwpos, PSWP pswp, PSWP pswpOld, 
     285void  OSLibMapWINDOWPOStoSWP(struct tagWINDOWPOS *pwpos, PSWP pswp, PSWP pswpOld,
    286286                             int parentHeight, HWND hFrame);
    287287
     
    290290HWND  OSLibWinBeginEnumWindows(HWND hwnd);
    291291HWND  OSLibWinGetNextWindow(HWND hwndEnum);
    292 HWND  OSLibWinQueryClientWindow(HWND hwndFrame);
    293292BOOL  OSLibWinEndEnumWindows(HWND hwndEnum);
    294293BOOL  OSLibWinQueryWindowProcess(HWND hwnd, ULONG *pid, ULONG *tid);
  • trunk/src/user32/win32wbase.cpp

    r10379 r10396  
    1 /* $Id: win32wbase.cpp,v 1.383 2004-01-11 12:03:18 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.384 2004-01-15 10:28:42 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    251251    }
    252252
    253     // Decrement class window counter 
     253    // Decrement class window counter
    254254    // NOTE: Must be done before ReleaseDC call for ownDC!
    255255    if(windowClass) {
     
    892892            Win32Hwnd = 0;
    893893        }
    894         // Decrement class window counter 
     894        // Decrement class window counter
    895895        // NOTE: Must be done before ReleaseDC call for ownDC!
    896896        if(windowClass) {
     
    25522552    }
    25532553
    2554     // Hack alert: This makes sure the tooltips windows in OpenOffice don't 
     2554    // Hack alert: This makes sure the tooltips windows in OpenOffice don't
    25552555    //             activate the owner windows too.
    25562556    //             First condition takes care of SetWindowPos during window
    25572557    //             creation. The 2nd one for calls made by OpenOffice
    2558     if(((getStyle() & WS_POPUP) && (getExStyle() & WS_EX_TOPMOST)) || (fuFlags & SWP_NOOWNERZORDER)) 
    2559     { 
     2558    if(((getStyle() & WS_POPUP) && (getExStyle() & WS_EX_TOPMOST)) || (fuFlags & SWP_NOOWNERZORDER))
     2559    {
    25602560        //SWP_NOOWNERZORDER means only the z-order of this window changes; it
    25612561        //should not affect the owner
     
    31963196    {
    31973197        wnd = GetWindowFromOS2FrameHandle(hwnd);
    3198         if(wnd == NULL) {
    3199             hwnd = OSLibWinQueryClientWindow(hwnd);
    3200             if(hwnd)  wnd = GetWindowFromOS2Handle(hwnd);
    3201         }
    32023198        if(wnd) {
    32033199             hwndWin32 = wnd->getWindowHandle();
     
    33433339        {
    33443340            wnd = GetWindowFromOS2FrameHandle(hwnd);
    3345             if(wnd == NULL) {
    3346                 hwnd = OSLibWinQueryClientWindow(hwnd);
    3347                 if(hwnd)  wnd = GetWindowFromOS2Handle(hwnd);
    3348             }
    3349 
    33503341            if(wnd) {
    33513342                //According to Wine, the class doesn't need to be specified
Note: See TracChangeset for help on using the changeset viewer.