Ignore:
Timestamp:
Mar 1, 2000, 2:30:07 PM (25 years ago)
Author:
sandervl
Message:

focus fixes + changes for dinput

File:
1 edited

Legend:

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

    r2948 r2956  
    1 /* $Id: win32wbase.cpp,v 1.170 2000-02-29 19:16:12 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.171 2000-03-01 13:30:05 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    4545#include "controls.h"
    4646#include <wprocess.h>
    47 #include "winmouse.h"
    4847#include <win\hook.h>
    4948#include <menu.h>
     
    864863{
    865864    switch(virtualkey) {
     865    case VK_LEFT:
     866    case VK_RIGHT:
    866867    case VK_DOWN:
    867868    case VK_UP:
     
    939940    }
    940941
    941     if(ISMOUSE_CAPTURED())
    942     {
    943         if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_BUTTON, msg->pt.x, msg->pt.y))
    944             return 0;
    945     }
    946 
    947942    if(fClick)
    948943    {
     
    965960                   && (hwndTop != GetForegroundWindow()) )
    966961                {
    967                       ::SetActiveWindow(hwndTop);
     962                    //SvL: Calling OSLibSetActiveWindow(hwndTop); causes focus problems
     963                    OSLibWinSetFocus(getOS2FrameWindowHandle());
    968964                }
    969965        }
     
    10071003ULONG Win32BaseWindow::MsgMouseMove(MSG *msg)
    10081004{
    1009     if(ISMOUSE_CAPTURED()) {
    1010         if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_MOVE, msg->pt.x, msg->pt.y))
    1011             return 0;
    1012     }
    1013 
    10141005    //TODO: hiword should be 0 if window enters menu mode (SDK docs)
    10151006    SendInternalMessageA(WM_SETCURSOR, Win32Hwnd, MAKELONG(lastHitTestVal, msg->message));
     
    10221013ULONG Win32BaseWindow::MsgChar(MSG *msg)
    10231014{
    1024     if(ISKDB_CAPTURED())
    1025     {
    1026         DInputKeyBoardHandler(msg);
    1027     }
    10281015    return DispatchMsgA(msg);
    10291016}
     
    24172404//the current process owns them.
    24182405//******************************************************************************
    2419 HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow,
    2420                                    BOOL fUnicode)
     2406HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow)
    24212407{
    24222408 Win32BaseWindow *parent = GetWindowFromHandle(hwndParent);
    24232409 Win32BaseWindow *child  = GetWindowFromHandle(hwndChildAfter);
    24242410
    2425     if((hwndParent != OSLIB_HWND_DESKTOP && !parent) ||
     2411    dprintf(("FindWindowEx %x %x %x %s", hwndParent, hwndChildAfter, atom, lpszWindow));
     2412    if((hwndParent != 0 && !parent) ||
    24262413       (hwndChildAfter != 0 && !child) ||
    2427        (hwndParent == OSLIB_HWND_DESKTOP && hwndChildAfter != 0))
     2414       (hwndParent == 0 && hwndChildAfter != 0))
    24282415    {
    24292416        dprintf(("Win32BaseWindow::FindWindowEx: parent or child not found %x %x", hwndParent, hwndChildAfter));
     
    24312418        return 0;
    24322419    }
    2433     if(hwndParent != OSLIB_HWND_DESKTOP)
     2420    SetLastError(0);
     2421    if(hwndParent != 0)
    24342422    {//if the current process owns the window, just do a quick search
    24352423        child = (Win32BaseWindow *)parent->getFirstChild();
     
    24482436        while(child)
    24492437        {
    2450             if(child->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
    2451                (!lpszWindow || child->hasWindowName(lpszWindow, fUnicode)))
     2438            //According to Wine, the class doesn't need to be specified
     2439            if((!atom || child->getWindowClass()->getAtom() == atom) &&
     2440               (!lpszWindow || child->hasWindowName(lpszWindow)))
    24522441            {
    24532442                dprintf(("FindWindowEx: Found window %x", child->getWindowHandle()));
     
    24742463
    24752464            if(wnd) {
    2476                 if(wnd->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
    2477                    (!lpszWindow || wnd->hasWindowName(lpszWindow, fUnicode)))
     2465                //According to Wine, the class doesn't need to be specified
     2466                if((!atom || wnd->getWindowClass()->getAtom() == atom) &&
     2467                   (!lpszWindow || wnd->hasWindowName(lpszWindow)))
    24782468                {
    24792469                    OSLibWinEndEnumWindows(henum);
     
    25722562    dprintf(("SetActiveWindow %x", getWindowHandle()));
    25732563    if(OSLibWinSetActiveWindow(OS2HwndFrame) == FALSE) {
    2574         dprintf(("OSLibWinSetActiveWindow %x returned FALSE!", OS2HwndFrame));
     2564        dprintf(("OSLibWinSetActiveWindow %x returned FALSE!", OS2HwndFrame));
    25752565    }
    25762566    hwndActive = GetActiveWindow();
Note: See TracChangeset for help on using the changeset viewer.