Ignore:
Timestamp:
Jan 11, 2004, 1:04:44 PM (22 years ago)
Author:
sandervl
Message:

Update

File:
1 edited

Legend:

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

    r10332 r10379  
    1 /* $Id: win32wbase.cpp,v 1.382 2003-11-17 13:15:03 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.383 2004-01-11 12:03:18 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    6868#include "timer.h"
    6969#include "user32api.h"
     70#include "callwrap.h"
    7071
    7172#define DBG_LOCALLOG    DBG_win32wbase
     
    144145        DebugInt3();
    145146  }
     147  Win32HwndOrg     = Win32Hwnd;
    146148
    147149  posx = posy      = 0;
     
    249251    }
    250252
    251     /* Decrement class window counter */
     253    // Decrement class window counter
     254    // NOTE: Must be done before ReleaseDC call for ownDC!
    252255    if(windowClass) {
    253256        RELEASE_CLASSOBJ(windowClass);
    254257    }
    255258
    256     if(isOwnDC())
    257         releaseOwnDC(ownDC);
     259    if(ownDC)
     260        ReleaseDC(Win32HwndOrg, ownDC);
    258261
    259262    if(Win32Hwnd)
     
    670673        //DC among different windows... DevOpenDC apparently can't be used
    671674        //for window DCs and WinOpenWindowDC must be associated with a window
    672         ownDC = GetDCEx(getWindowHandle(), NULL, DCX_USESTYLE);
     675        ownDC = 0; //GetDCEx(getWindowHandle(), NULL, DCX_USESTYLE);
    673676    }
    674677    /* Set the window menu */
     
    888891            HwFreeWindowHandle(Win32Hwnd);
    889892            Win32Hwnd = 0;
     893        }
     894        // Decrement class window counter
     895        // NOTE: Must be done before ReleaseDC call for ownDC!
     896        if(windowClass) {
     897            RELEASE_CLASSOBJ(windowClass);
     898        }
     899
     900        if(ownDC) {
     901            ReleaseDC(Win32Hwnd, ownDC);
     902            ownDC = 0;
    890903        }
    891904    }
     
    23512364
    23522365    case SW_SHOWNOACTIVATE:
    2353         swp |= SWP_NOZORDER;
    2354         if (GetActiveWindow())
    2355             swp |= SWP_NOACTIVATE;
     2366        swp |= SWP_NOZORDER | SWP_NOACTIVATE;
    23562367        /* fall through */
    23572368    case SW_SHOWNORMAL:  /* same as SW_NORMAL: */
     
    25392550            dprintf(("new window rectangle (%d,%d)(%d,%d)", rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
    25402551        }
     2552    }
     2553
     2554    // Hack alert: This makes sure the tooltips windows in OpenOffice don't
     2555    //             activate the owner windows too.
     2556    //             First condition takes care of SetWindowPos during window
     2557    //             creation. The 2nd one for calls made by OpenOffice
     2558    if(((getStyle() & WS_POPUP) && (getExStyle() & WS_EX_TOPMOST)) || (fuFlags & SWP_NOOWNERZORDER))
     2559    {
     2560        //SWP_NOOWNERZORDER means only the z-order of this window changes; it
     2561        //should not affect the owner
     2562        //PM doesn't support this feature, so this hack might work
     2563        wpos.flags |= SWP_NOZORDER;
    25412564    }
    25422565
     
    31233146        child->addRef();
    31243147        unlock();
    3125         if(lpfn(hwnd, lParam) == FALSE)
     3148        if(WrapCallback2((WNDPROC)lpfn, hwnd, lParam) == FALSE)
    31263149        {
    31273150                child->release();
     
    31893212            if(dwThreadId == tid) {
    31903213                dprintf(("EnumThreadWindows: Found Window %x", hwndWin32));
    3191                 if((rc = lpfn(hwndWin32, lParam)) == FALSE) {
     3214                if((rc = WrapCallback2((WNDPROC)lpfn, hwndWin32, lParam)) == FALSE) {
    31923215                    break;
    31933216                }
     
    32233246            {
    32243247                dprintf2(("EnumWindows: Found Window %x", hwnd));
    3225                 if((rc = lpfn(hwnd, lParam)) == FALSE) {
     3248                if((rc = WrapCallback2((WNDPROC)lpfn, hwnd, lParam)) == FALSE) {
    32263249                    break;
    32273250                }
Note: See TracChangeset for help on using the changeset viewer.