- Timestamp:
- Sep 29, 1999, 11:16:32 AM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r1082 r1093 1 /* $Id: pmwindow.cpp,v 1.1 1 1999-09-28 13:27:35sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.12 1999-09-29 09:16:31 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 379 379 case WM_ACTIVATE: 380 380 { 381 HWND hwndActivate = (HWND)mp1; 382 383 dprintf(("OS2: WM_ACTIVATE %x", hwnd)); 381 HWND hwndActivate = (HWND)mp2; 382 BOOL fMinimized = FALSE; 383 384 dprintf(("OS2: WM_ACTIVATE %x %x", hwnd, hwndActivate)); 384 385 if(WinQueryWindowULong(hwndActivate, OFFSET_WIN32PM_MAGIC) != WIN32PM_MAGIC) { 385 386 //another (non-win32) application's window … … 387 388 hwndActivate = NULL; 388 389 } 389 if(win32wnd->MsgActivate(1, hwndActivate)) { 390 if(WinQueryWindowULong(hwnd, QWL_STYLE) & WS_MINIMIZED) 391 { 392 fMinimized = TRUE; 393 } 394 395 if(win32wnd->MsgActivate(SHORT1FROMMP(mp1), fMinimized, Win32BaseWindow::OS2ToWin32Handle(hwndActivate))) { 390 396 goto RunDefWndProc; 391 397 } … … 407 413 } 408 414 if((ULONG)mp2 == TRUE) { 409 rc = win32wnd->MsgSetFocus( hwndFocus);410 } 411 else rc = win32wnd->MsgKillFocus( hwndFocus);415 rc = win32wnd->MsgSetFocus(Win32BaseWindow::OS2ToWin32Handle(hwndFocus)); 416 } 417 else rc = win32wnd->MsgKillFocus(Win32BaseWindow::OS2ToWin32Handle(hwndFocus)); 412 418 if(rc) { 413 419 goto RunDefWndProc; -
trunk/src/user32/win32wbase.cpp
r1091 r1093 1 /* $Id: win32wbase.cpp,v 1. 19 1999-09-29 08:27:15sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.20 1999-09-29 09:16:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 914 914 //****************************************************************************** 915 915 //****************************************************************************** 916 ULONG Win32BaseWindow::MsgActivate(BOOL fActivate, HWND hwnd) 917 { 918 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE) 916 ULONG Win32BaseWindow::MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd) 917 { 918 ULONG rc, curprocid, procidhwnd = -1, threadidhwnd = 0; 919 920 //According to SDK docs, if app returns FALSE & window is being deactivated, 921 //default processing is cancelled 922 //TODO: According to Wine we should proceed anyway if window is sysmodal 923 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE && !fActivate) 919 924 { 920 if(!fActivate) { 921 return 1; 922 } 923 } 924 return SendInternalMessageA(WM_ACTIVATE, (fActivate) ? WA_ACTIVE : WA_INACTIVE, hwnd); 925 return 0; 926 } 927 rc = SendInternalMessageA(WM_ACTIVATE, MAKELONG((fActivate) ? WA_ACTIVE : WA_INACTIVE, fMinimized), hwnd); 928 929 curprocid = GetCurrentProcessId(); 930 if(hwnd) { 931 threadidhwnd = GetWindowThreadProcessId(hwnd, &procidhwnd); 932 } 933 934 if(curprocid != procidhwnd && fActivate) { 935 SendInternalMessageA(WM_ACTIVATEAPP, 1, threadidhwnd); 936 } 937 return rc; 925 938 } 926 939 //****************************************************************************** … … 1061 1074 ULONG Win32BaseWindow::MsgSetFocus(HWND hwnd) 1062 1075 { 1063 if(hwnd == 0) { 1064 //other app lost focus 1065 SendInternalMessageA(WM_ACTIVATEAPP, TRUE, 0); //TODO: Need thread id from hwnd app 1066 } 1067 return SendInternalMessageA(WM_SETFOCUS, OS2ToWin32Handle (hwnd), 0); 1076 return SendInternalMessageA(WM_SETFOCUS, hwnd, 0); 1068 1077 } 1069 1078 //****************************************************************************** … … 1071 1080 ULONG Win32BaseWindow::MsgKillFocus(HWND hwnd) 1072 1081 { 1073 if(hwnd == 0) { 1074 //other app lost focus 1075 SendInternalMessageA(WM_ACTIVATEAPP, FALSE, 0); //TODO: Need thread id from hwnd app 1076 } 1077 return SendInternalMessageA(WM_KILLFOCUS, OS2ToWin32Handle (hwnd), 0); 1082 return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0); 1078 1083 } 1079 1084 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r1091 r1093 1 /* $Id: win32wbase.h,v 1. 9 1999-09-29 08:27:16sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.10 1999-09-29 09:16:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 72 72 ULONG MsgHitTest(ULONG x, ULONG y); 73 73 ULONG MsgSize(ULONG width, ULONG height, BOOL fMinimize, BOOL fMaximize); 74 ULONG MsgActivate(BOOL fActivate, HWND hwnd);74 virtual ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd); 75 75 ULONG MsgSetFocus(HWND hwnd); 76 76 ULONG MsgKillFocus(HWND hwnd); -
trunk/src/user32/win32wmdichild.cpp
r949 r1093 1 /* $Id: win32wmdichild.cpp,v 1. 1 1999-09-15 23:19:01sandervl Exp $ */1 /* $Id: win32wmdichild.cpp,v 1.2 1999-09-29 09:16:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Child Window Class for OS/2 … … 55 55 //****************************************************************************** 56 56 //****************************************************************************** 57 ULONG Win32MDIChildWindow::MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd) 58 { 59 ULONG rc, curprocid, procidhwnd = -1, threadidhwnd = 0; 60 61 //According to SDK docs, if app returns FALSE & window is being deactivated, 62 //default processing is cancelled 63 //TODO: According to Wine we should proceed anyway if window is sysmodal 64 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE && !fActivate) 65 { 66 return 0; 67 } 68 if(fActivate) 69 { 70 rc = SendInternalMessageA(WM_CHILDACTIVATE, MAKELONG((fActivate) ? WA_ACTIVE : WA_INACTIVE, fMinimized), hwnd); 71 curprocid = GetCurrentProcessId(); 72 if(hwnd) { 73 threadidhwnd = GetWindowThreadProcessId(hwnd, &procidhwnd); 74 } 75 76 if(curprocid != procidhwnd && fActivate) { 77 SendInternalMessageA(WM_ACTIVATEAPP, 1, threadidhwnd); 78 } 79 return rc; 80 } 81 else return 1; 82 } 83 //****************************************************************************** 84 //****************************************************************************** 57 85 LRESULT Win32MDIChildWindow::DefMDIChildProcA(UINT Msg, WPARAM wParam, LPARAM lParam) 58 86 { -
trunk/src/user32/win32wmdichild.h
r949 r1093 1 /* $Id: win32wmdichild.h,v 1. 1 1999-09-15 23:19:01sandervl Exp $ */1 /* $Id: win32wmdichild.h,v 1.2 1999-09-29 09:16:32 sandervl Exp $ */ 2 2 /* 3 3 * Win32 MDI Client Window Class for OS/2 … … 24 24 virtual ~Win32MDIChildWindow(); 25 25 26 virtual ULONG MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd); 27 26 28 static HWND createChild(Win32MDIClientWindow *client, LPMDICREATESTRUCTA cs); 27 29 void childGetMinMaxInfo(MINMAXINFO* lpMinMax);
Note:
See TracChangeset
for help on using the changeset viewer.