- Timestamp:
- Oct 25, 2001, 12:40:45 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r7195 r7200 1 /* $Id: pmwindow.cpp,v 1.15 7 2001-10-24 15:41:54sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.158 2001-10-25 10:40:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 62 62 63 63 static PFNWP pfnFrameWndProc = NULL; 64 static HWND hwndFocusChange = 0; 64 65 65 66 MRESULT EXPENTRY Win32WindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); … … 1253 1254 #endif 1254 1255 1255 #ifdef DEBUG1256 1256 case WM_FOCUSCHANGE: 1257 1257 { … … 1261 1261 USHORT fsFocusChange = SHORT2FROMMP(mp2); 1262 1262 1263 //Save window that gains focus so we can determine which 1264 //process we lose activation to 1265 hwndFocusChange = (HWND)mp1; 1266 1263 1267 dprintf(("PMFRAME:WM_FOCUSCHANGE %x %x (%x) %x %x", win32wnd->getWindowHandle(), OS2ToWin32Handle(hwndFocus), hwndFocus, usSetFocus, fsFocusChange)); 1264 1268 goto RunDefFrameWndProc; 1265 1269 } 1266 1270 1271 #ifdef DEBUG 1267 1272 case WM_SETFOCUS: 1268 1273 { … … 1285 1290 WinSendDlgItemMsg(hwnd, FID_TITLEBAR, TBM_SETHILITE, mp1, 0); 1286 1291 } 1287 WinSendDlgItemMsg(hwnd, FID_CLIENT, WM_ACTIVATE, mp1, mp2); 1292 if(SHORT1FROMMP(mp1) == 0) { 1293 //deactivate 1294 WinSendDlgItemMsg(hwnd, FID_CLIENT, WM_ACTIVATE, mp1, mp2); 1295 } 1296 PID pidThis, pidPartner, pidTemp; 1297 TID tidPartner; 1298 HENUM henum; 1299 HWND hwndEnum; 1300 1301 WinQueryWindowProcess(hwnd, &pidThis, NULL); 1302 WinQueryWindowProcess(hwndFocusChange, &pidPartner, &tidPartner); 1303 1304 if(pidThis != pidPartner) { 1305 //Gain or lose activation to window in other process 1306 //must send WM_ACTIVATEAPP to top-level windows 1307 1308 //Iterate over all child windows of the desktop 1309 henum = WinBeginEnumWindows(HWND_DESKTOP); 1310 1311 while(hwndEnum = WinGetNextWindow(henum)) 1312 { 1313 WinQueryWindowProcess(hwndEnum, &pidTemp, NULL); 1314 if(pidTemp == pidThis) 1315 { 1316 SendMessageA(OS2ToWin32Handle(hwndEnum), WM_ACTIVATEAPP_W, (WPARAM)SHORT1FROMMP(mp1), (LPARAM)tidPartner); 1317 } 1318 } 1319 WinEndEnumWindows(henum); 1320 } 1321 if(SHORT1FROMMP(mp1)) { 1322 //activate 1323 WinSendDlgItemMsg(hwnd, FID_CLIENT, WM_ACTIVATE, mp1, mp2); 1324 } 1288 1325 1289 1326 //CB: show owner behind the dialog -
trunk/src/user32/win32wbase.cpp
r7195 r7200 1 /* $Id: win32wbase.cpp,v 1.29 5 2001-10-24 15:41:54sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.296 2001-10-25 10:40:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1001 1001 } 1002 1002 1003 rc = SendInternalMessageA(WM_ACTIVATE, MAKELONG((fActivate) ? WA_ACTIVE : WA_INACTIVE, fMinimized), hwnd); 1004 1005 if(hwndOS2Win) { 1006 threadidhwnd = O32_GetWindowThreadProcessId(hwndOS2Win, &procidhwnd); 1007 } 1008 1009 if(fActivate) { 1010 SendInternalMessageA(WM_ACTIVATEAPP, 1, dwThreadId); //activate; specify window thread id 1011 } 1012 else SendInternalMessageA(WM_ACTIVATEAPP, 0, threadidhwnd); //deactivate; specify thread id of other process 1013 return rc; 1003 return SendInternalMessageA(WM_ACTIVATE, MAKELONG((fActivate) ? WA_ACTIVE : WA_INACTIVE, fMinimized), hwnd); 1014 1004 } 1015 1005 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.