- Timestamp:
- Mar 1, 2000, 2:30:07 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r2881 r2956 1 /* $Id: oslibmsgtranslate.cpp,v 1.1 8 2000-02-24 19:19:08sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.19 2000-03-01 13:30:04 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 31 31 #include "pmwindow.h" 32 32 #include "oslibwin.h" 33 34 #define DBG_LOCALLOG DBG_oslibmsgtranslate 33 #include "winmouse.h" 34 35 #define DBG_LOCALLOG DBG_oslibmsgtranslate 35 36 #include "dbglocal.h" 36 37 … … 326 327 if (!win32wnd->CanReceiveSizeMsgs()) goto dummymessage; 327 328 328 329 330 331 332 333 334 335 336 329 ULONG windowStyle = WinQueryWindowULong(os2Msg->hwnd, QWL_STYLE); 330 win32wnd->setStyle(win32wnd->getStyle() & ~(WS_MAXIMIZE_W|WS_MINIMIZE_W)); 331 if (windowStyle & WS_MINIMIZED) { 332 win32wnd->setStyle(win32wnd->getStyle() | WS_MINIMIZE_W); 333 } 334 else 335 if (windowStyle & WS_MAXIMIZED) { 336 win32wnd->setStyle(win32wnd->getStyle() | WS_MAXIMIZE_W); 337 } 337 338 338 339 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { … … 436 437 winMsg->lParam = MAKELONG(ClientPoint.x, ClientPoint.y); //client coordinates 437 438 } 439 if(ISMOUSE_CAPTURED()) 440 { 441 if(DInputMouseHandler(win32wnd->getWindowHandle(), MOUSEMSG_BUTTON, winMsg->pt.x, winMsg->pt.y)) 442 goto dummymessage; 443 } 438 444 439 445 break; … … 467 473 winMsg->lParam = MAKELONG(SHORT1FROMMP(os2Msg->mp1),mapY(win32wnd,SHORT2FROMMP(os2Msg->mp1))); 468 474 } 475 if(ISMOUSE_CAPTURED()) 476 { 477 if(DInputMouseHandler(win32wnd->getWindowHandle(), MOUSEMSG_MOVE, winMsg->pt.x, winMsg->pt.y)) 478 goto dummymessage; 479 } 469 480 //OS/2 Window coordinates -> Win32 Window coordinates 470 481 break; … … 622 633 } 623 634 } 624 635 if(ISKDB_CAPTURED()) 636 { 637 DInputKeyBoardHandler(winMsg); 638 } 625 639 break; 626 640 } -
trunk/src/user32/pmframe.cpp
r2834 r2956 1 /* $Id: pmframe.cpp,v 1.4 3 2000-02-20 18:28:32 cbratschiExp $ */1 /* $Id: pmframe.cpp,v 1.44 2000-03-01 13:30:05 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 434 434 435 435 dprintf(("PMFRAME: WM_ACTIVATE %x %x", hwnd, mp2)); 436 if(win32wnd->IsWindowCreated()) 437 win32wnd->DispatchMsgA(pWinMsg); 438 436 439 if (win32wnd->IsWindowCreated()) 437 440 { … … 451 454 WinSetWindowUShort(hwnd,QWS_FLAGS,mp1 ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE)); 452 455 } 453 if(win32wnd->IsWindowCreated())454 win32wnd->DispatchMsgA(pWinMsg);455 456 456 RestoreOS2TIB(); 457 457 return 0; -
trunk/src/user32/win32wbase.cpp
r2948 r2956 1 /* $Id: win32wbase.cpp,v 1.17 0 2000-02-29 19:16:12sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.171 2000-03-01 13:30:05 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 45 45 #include "controls.h" 46 46 #include <wprocess.h> 47 #include "winmouse.h"48 47 #include <win\hook.h> 49 48 #include <menu.h> … … 864 863 { 865 864 switch(virtualkey) { 865 case VK_LEFT: 866 case VK_RIGHT: 866 867 case VK_DOWN: 867 868 case VK_UP: … … 939 940 } 940 941 941 if(ISMOUSE_CAPTURED())942 {943 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_BUTTON, msg->pt.x, msg->pt.y))944 return 0;945 }946 947 942 if(fClick) 948 943 { … … 965 960 && (hwndTop != GetForegroundWindow()) ) 966 961 { 967 ::SetActiveWindow(hwndTop); 962 //SvL: Calling OSLibSetActiveWindow(hwndTop); causes focus problems 963 OSLibWinSetFocus(getOS2FrameWindowHandle()); 968 964 } 969 965 } … … 1007 1003 ULONG Win32BaseWindow::MsgMouseMove(MSG *msg) 1008 1004 { 1009 if(ISMOUSE_CAPTURED()) {1010 if(DInputMouseHandler(getWindowHandle(), MOUSEMSG_MOVE, msg->pt.x, msg->pt.y))1011 return 0;1012 }1013 1014 1005 //TODO: hiword should be 0 if window enters menu mode (SDK docs) 1015 1006 SendInternalMessageA(WM_SETCURSOR, Win32Hwnd, MAKELONG(lastHitTestVal, msg->message)); … … 1022 1013 ULONG Win32BaseWindow::MsgChar(MSG *msg) 1023 1014 { 1024 if(ISKDB_CAPTURED())1025 {1026 DInputKeyBoardHandler(msg);1027 }1028 1015 return DispatchMsgA(msg); 1029 1016 } … … 2417 2404 //the current process owns them. 2418 2405 //****************************************************************************** 2419 HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 2420 BOOL fUnicode) 2406 HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow) 2421 2407 { 2422 2408 Win32BaseWindow *parent = GetWindowFromHandle(hwndParent); 2423 2409 Win32BaseWindow *child = GetWindowFromHandle(hwndChildAfter); 2424 2410 2425 if((hwndParent != OSLIB_HWND_DESKTOP && !parent) || 2411 dprintf(("FindWindowEx %x %x %x %s", hwndParent, hwndChildAfter, atom, lpszWindow)); 2412 if((hwndParent != 0 && !parent) || 2426 2413 (hwndChildAfter != 0 && !child) || 2427 (hwndParent == OSLIB_HWND_DESKTOP&& hwndChildAfter != 0))2414 (hwndParent == 0 && hwndChildAfter != 0)) 2428 2415 { 2429 2416 dprintf(("Win32BaseWindow::FindWindowEx: parent or child not found %x %x", hwndParent, hwndChildAfter)); … … 2431 2418 return 0; 2432 2419 } 2433 if(hwndParent != OSLIB_HWND_DESKTOP) 2420 SetLastError(0); 2421 if(hwndParent != 0) 2434 2422 {//if the current process owns the window, just do a quick search 2435 2423 child = (Win32BaseWindow *)parent->getFirstChild(); … … 2448 2436 while(child) 2449 2437 { 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))) 2452 2441 { 2453 2442 dprintf(("FindWindowEx: Found window %x", child->getWindowHandle())); … … 2474 2463 2475 2464 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))) 2478 2468 { 2479 2469 OSLibWinEndEnumWindows(henum); … … 2572 2562 dprintf(("SetActiveWindow %x", getWindowHandle())); 2573 2563 if(OSLibWinSetActiveWindow(OS2HwndFrame) == FALSE) { 2574 2564 dprintf(("OSLibWinSetActiveWindow %x returned FALSE!", OS2HwndFrame)); 2575 2565 } 2576 2566 hwndActive = GetActiveWindow(); -
trunk/src/user32/win32wbase.h
r2881 r2956 1 /* $Id: win32wbase.h,v 1.8 6 2000-02-24 19:19:10sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.87 2000-03-01 13:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 270 270 Win32BaseWindow *FindWindowById(int id); 271 271 272 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow, 273 BOOL fUnicode = 0); 272 static HWND FindWindowEx(HWND hwndParent, HWND hwndChildAfter, ATOM atom, LPSTR lpszWindow); 274 273 275 274 BOOL EnumChildWindows(WNDENUMPROC lpfn, LPARAM lParam); -
trunk/src/user32/win32wbasenonclient.cpp
r2873 r2956 1 /* $Id: win32wbasenonclient.cpp,v 1.1 5 2000-02-23 17:05:19 cbratschiExp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.16 2000-03-01 13:30:06 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 260 260 Win32BaseWindow *topparent = GetTopParent(); 261 261 262 if (GetActiveWindow() != topparent->getWindowHandle()) 263 topparent->SetActiveWindow(); 264 265 if (GetActiveWindow() == topparent->getWindowHandle()) 266 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); 267 break; 262 if (GetActiveWindow() != topparent->getWindowHandle()) 263 { 264 //SvL: Calling topparent->SetActiveWindow() causes focus problems 265 OSLibWinSetFocus(topparent->getOS2FrameWindowHandle()); 266 } 267 268 if (GetActiveWindow() == topparent->getWindowHandle()) 269 SendInternalMessageA(WM_SYSCOMMAND,SC_MOVE+HTCAPTION,lParam); 270 break; 268 271 } 269 272 -
trunk/src/user32/window.cpp
r2881 r2956 1 /* $Id: window.cpp,v 1.5 7 2000-02-24 19:19:10sandervl Exp $ */1 /* $Id: window.cpp,v 1.58 2000-03-01 13:30:07 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 31 31 #include "winicon.h" 32 32 #include <win\winpos.h> 33 #include <heapstring.h> 33 34 34 35 #define DBG_LOCALLOG DBG_window … … 187 188 } 188 189 if(HIWORD(className)) { 189 dprintf(("CreateWindowExW: class % s parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle));190 dprintf(("CreateWindowExW: class %ls parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle)); 190 191 } 191 192 else dprintf(("CreateWindowExW: class %d parent %x (%d,%d) (%d,%d), %x %x", className, parent, x, y, width, height, style, exStyle)); … … 287 288 if(!window) { 288 289 dprintf(("CreateMDIWindowW, window %x not found", hwndParent)); 289 SetLastError(ERROR_INVALID_WINDOW_HANDLE);290 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 290 291 return 0; 291 292 } … … 952 953 HWND WIN32API FindWindowA(LPCSTR lpszClass, LPCSTR lpszWindow) 953 954 { 954 if(!lpszClass) { 955 SetLastError(ERROR_INVALID_PARAMETER); 956 return 0; 957 } 958 if(HIWORD(lpszClass)) { 959 dprintf(("USER32: FindWindow %s %s\n", lpszClass, lpszWindow)); 960 } 961 else dprintf(("USER32: FindWindow %x %s\n", lpszClass, lpszWindow)); 962 963 return Win32BaseWindow::FindWindowEx(OSLIB_HWND_DESKTOP, 0, (LPSTR)lpszClass, (LPSTR)lpszWindow); 955 return FindWindowExA( NULL, NULL, lpszClass, lpszWindow ); 964 956 } 965 957 //****************************************************************************** … … 967 959 HWND WIN32API FindWindowW( LPCWSTR lpClassName, LPCWSTR lpWindowName) 968 960 { 969 char *astring1 = UnicodeToAsciiString((LPWSTR)lpClassName); 970 char *astring2 = UnicodeToAsciiString((LPWSTR)lpWindowName); 971 HWND rc; 972 973 rc = FindWindowA(astring1, astring2); 974 FreeAsciiString(astring1); 975 FreeAsciiString(astring2); 976 return rc; 961 return FindWindowExW( NULL, NULL, lpClassName, lpWindowName ); 977 962 } 978 963 //****************************************************************************** … … 980 965 HWND WIN32API FindWindowExA(HWND hwndParent, HWND hwndChildAfter, LPCSTR lpszClass, LPCSTR lpszWindow) 981 966 { 982 if(!lpszClass) { 983 SetLastError(ERROR_INVALID_PARAMETER); 984 return 0; 985 } 986 if(HIWORD(lpszClass)) { 987 dprintf(("USER32: FindWindowExA (%x,%x) %s %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 988 } 989 else dprintf(("USER32: FindWindowExA (%x,%x)%x %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 990 991 return Win32BaseWindow::FindWindowEx(hwndParent, hwndChildAfter, (LPSTR)lpszClass, (LPSTR)lpszWindow); 967 ATOM atom = 0; 968 969 if (lpszClass) 970 { 971 /* If the atom doesn't exist, then no class */ 972 /* with this name exists either. */ 973 if (!(atom = GlobalFindAtomA( lpszClass ))) 974 { 975 SetLastError(ERROR_CANNOT_FIND_WND_CLASS); 976 return 0; 977 } 978 } 979 return Win32BaseWindow::FindWindowEx(hwndParent, hwndChildAfter, atom, (LPSTR)lpszWindow); 992 980 } 993 981 /***************************************************************************** … … 1007 995 * error information, call GetLastError. 1008 996 * Remark : 1009 * Status : UNTESTED STUB1010 997 * 1011 * Author : Patrick Haller [Thu, 1998/02/26 11:55]1012 998 *****************************************************************************/ 1013 999 1014 1000 HWND WIN32API FindWindowExW(HWND hwndParent, 1015 HWND hwndChildAfter, 1016 LPCWSTR lpszClass, 1017 LPCWSTR lpszWindow) 1018 { 1019 if(!lpszClass) { 1020 SetLastError(ERROR_INVALID_PARAMETER); 1021 return 0; 1022 } 1023 dprintf(("USER32: FindWindowExW (%x,%x) %x %s\n", hwndParent, hwndChildAfter, lpszClass, lpszWindow)); 1024 1025 return Win32BaseWindow::FindWindowEx(hwndParent, hwndChildAfter, (LPSTR)lpszClass, (LPSTR)lpszWindow); 1001 HWND hwndChildAfter, 1002 LPCWSTR lpszClass, 1003 LPCWSTR lpszWindow) 1004 { 1005 ATOM atom = 0; 1006 char *buffer; 1007 HWND hwnd; 1008 1009 if (lpszClass) 1010 { 1011 /* If the atom doesn't exist, then no class */ 1012 /* with this name exists either. */ 1013 if (!(atom = GlobalFindAtomW( lpszClass ))) 1014 { 1015 SetLastError(ERROR_CANNOT_FIND_WND_CLASS); 1016 return 0; 1017 } 1018 } 1019 buffer = HEAP_strdupWtoA( GetProcessHeap(), 0, lpszWindow ); 1020 hwnd = Win32BaseWindow::FindWindowEx(hwndParent, hwndChildAfter, atom, buffer); 1021 HeapFree( GetProcessHeap(), 0, buffer ); 1022 return hwnd; 1026 1023 } 1027 1024 //****************************************************************************** -
trunk/src/user32/winmouse.cpp
r2803 r2956 1 /* $Id: winmouse.cpp,v 1. 5 2000-02-16 14:28:28sandervl Exp $ */1 /* $Id: winmouse.cpp,v 1.6 2000-03-01 13:30:07 sandervl Exp $ */ 2 2 /* 3 3 * Mouse handler for DINPUT … … 12 12 #include <misc.h> 13 13 #include "win32wbase.h" 14 #include <win\mouse.h> 14 15 #include "winmouse.h" 15 16 #include "oslibmsg.h" -
trunk/src/user32/winmouse.h
r2469 r2956 1 /* $Id: winmouse.h,v 1. 4 2000-01-18 20:08:18sandervl Exp $ */1 /* $Id: winmouse.h,v 1.5 2000-03-01 13:30:07 sandervl Exp $ */ 2 2 /* 3 3 * Mouse handler for DINPUT … … 11 11 #ifndef __WINMOUSE_H__ 12 12 #define __WINMOUSE_H__ 13 14 #include <win\mouse.h>15 13 16 14 extern LPMOUSE_EVENT_PROC mouseHandler;
Note:
See TracChangeset
for help on using the changeset viewer.