Changeset 6012 for trunk/src


Ignore:
Timestamp:
Jun 14, 2001, 4:49:19 PM (24 years ago)
Author:
sandervl
Message:

temporary workaround added for opera crash

Location:
trunk/src/user32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/HOOK.CPP

    r5973 r6012  
    1 /* $Id: HOOK.CPP,v 1.21 2001-06-12 17:02:33 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.22 2001-06-14 14:49:16 sandervl Exp $ */
    22
    33/*
     
    9999static HANDLE HOOK_threadHooks[WH_NB_HOOKS] = { 0 };
    100100static CRITICAL_SECTION threadCritSect = {0};
     101static BOOL fInitHook = FALSE;
    101102
    102103#ifdef GLOBAL_HOOKS
    103104#define SYSTEMHOOK_LOCK()       systemHookMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalHookMutex);
    104105#define SYSTEMHOOK_UNLOCK()     systemHookMutex.leave(&hGlobalHookMutex);
     106#define INIT_SYSTEMHOOK()       aldkjfslfjsdlkfj
    105107#else
    106108#define SYSTEMHOOK_LOCK()       EnterCriticalSection(&systemCritSect);
    107109#define SYSTEMHOOK_UNLOCK()     LeaveCriticalSection(&systemCritSect);
     110#define INIT_SYSTEMHOOK()       InitializeCriticalSection(&systemCritSect);
    108111#endif
    109112
     
    300303        SetLastError(ERROR_INVALID_PARAMETER);
    301304        return 0;
     305    }
     306
     307    if(!fInitHook) {
     308        InitializeCriticalSection(&threadCritSect);
     309        INIT_SYSTEMHOOK();
     310        fInitHook = TRUE;
    302311    }
    303312
     
    367376
    368377    dprintf(("Removing hook %08x\n", data));
     378
     379    if(!fInitHook) {
     380        InitializeCriticalSection(&threadCritSect);
     381        INIT_SYSTEMHOOK();
     382        fInitHook = TRUE;
     383    }
    369384
    370385    if (data->flags & HOOK_INUSE)
  • trunk/src/user32/win32wbase.cpp

    r6008 r6012  
    1 /* $Id: win32wbase.cpp,v 1.269 2001-06-14 11:30:56 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.270 2001-06-14 14:49:17 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    29942994HWND Win32BaseWindow::FindWindowById(int id)
    29952995{
     2996    HWND hwnd;
     2997
    29962998    lock();
    29972999    for (Win32BaseWindow *child = (Win32BaseWindow *)getFirstChild(); child; child = (Win32BaseWindow *)child->getNextChild())
     
    29993001        if (child->getWindowId() == id)
    30003002        {
     3003            hwnd = child->getWindowHandle();
    30013004            unlock();
    3002             return child->getWindowHandle();
     3005            return hwnd;
    30033006        }
    30043007    }
     
    37023705 Win32BaseWindow *window;
    37033706
    3704     lock(&critsect);
     3707////    lock(&critsect);
    37053708    if(HwGetWindowHandleData(hwnd, (DWORD *)&window) == TRUE) {
    37063709         if(window) {
     
    37083711             window->addRef();
    37093712         }
    3710          unlock(&critsect);
     3713////         unlock(&critsect);
    37113714         return window;
    37123715    }
    3713     unlock(&critsect);
     3716////    unlock(&critsect);
    37143717//    dprintf2(("Win32BaseWindow::GetWindowFromHandle: not a win32 window %x", hwnd));
    37153718    return NULL;
  • trunk/src/user32/windowmsg.cpp

    r5935 r6012  
    1 /* $Id: windowmsg.cpp,v 1.26 2001-06-09 14:50:26 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.27 2001-06-14 14:49:19 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    204204    if(!window) {
    205205        dprintf(("PostMessageA, window %x not found", hwnd));
    206         return 0;
     206        return FALSE;
    207207    }
    208208    hwndOS2 = window->getOS2WindowHandle();
     
    230230    if(!window) {
    231231        dprintf(("PostMessageW, window %x not found", hwnd));
    232         return 0;
     232        return FALSE;
    233233    }
    234234    hwndOS2 = window->getOS2WindowHandle();
Note: See TracChangeset for help on using the changeset viewer.