Changeset 2426 for trunk/src/user32/new/win32wbase.cpp
- Timestamp:
- Jan 13, 2000, 2:54:55 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/win32wbase.cpp
r2421 r2426 1 /* $Id: win32wbase.cpp,v 1.3 7 2000-01-12 17:37:29 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.38 2000-01-13 13:54:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 834 834 //****************************************************************************** 835 835 //****************************************************************************** 836 ULONG Win32BaseWindow::MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd )837 { 838 ULONG rc, curprocid,procidhwnd = -1, threadidhwnd = 0;836 ULONG Win32BaseWindow::MsgActivate(BOOL fActivate, BOOL fMinimized, HWND hwnd, HWND hwndOS2Win) 837 { 838 ULONG rc, procidhwnd = -1, threadidhwnd = 0; 839 839 840 840 … … 842 842 //default processing is cancelled 843 843 //TODO: According to Wine we should proceed anyway if window is sysmodal 844 #if 0 844 845 if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE && !fActivate) 845 846 { 846 847 return 0; 847 848 } 849 #endif 848 850 rc = SendInternalMessageA(WM_ACTIVATE, MAKELONG((fActivate) ? WA_ACTIVE : WA_INACTIVE, fMinimized), hwnd); 849 851 850 curprocid = GetCurrentProcessId();851 if(hwnd) {852 threadidhwnd = GetWindowThreadProcessId(hwnd, &procidhwnd);853 } 854 855 if(curprocid != procidhwnd && fActivate) {856 SendInternalMessageA(WM_ACTIVATEAPP, 1, threadidhwnd);857 }852 if(hwndOS2Win) { 853 threadidhwnd = O32_GetWindowThreadProcessId(hwndOS2Win, &procidhwnd); 854 } 855 856 if(fActivate) { 857 SendInternalMessageA(WM_ACTIVATEAPP, 1, dwThreadId); //activate; specify window thread id 858 } 859 else SendInternalMessageA(WM_ACTIVATEAPP, 0, threadidhwnd); //deactivate; specify thread id of other process 858 860 return rc; 859 861 } … … 1051 1053 } 1052 1054 //****************************************************************************** 1053 //****************************************************************************** 1054 ULONG Win32BaseWindow::MsgFormatFrame() 1055 { 1056 RECT window = rectWindow,client = rectClient,rect; 1055 //Called when either the frame's size or position has changed (lpWndPos != NULL) 1056 //or when the frame layout has changed (i.e. scrollbars added/removed) (lpWndPos == NULL) 1057 //****************************************************************************** 1058 ULONG Win32BaseWindow::MsgFormatFrame(WINDOWPOS *lpWndPos) 1059 { 1060 RECT oldWindowRect = rectWindow, client = rectClient, newWindowRect; 1057 1061 WINDOWPOS wndPos; 1058 1062 1059 wndPos.hwnd = Win32Hwnd; 1060 wndPos.hwndInsertAfter = 0; 1061 rect = rectWindow; 1062 if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&rect); 1063 wndPos.x = rect.left; 1064 wndPos.y = rect.top; 1065 wndPos.cx = rect.right-rect.left; 1066 wndPos.cy = rect.bottom-rect.top; 1067 wndPos.flags = 0; //dummy 1068 1069 return SendNCCalcSize(TRUE,&window,&window,&client,&wndPos,&rectClient); 1063 if(lpWndPos) { 1064 //set new window rectangle 1065 setWindowRect(lpWndPos->x, lpWndPos->y, lpWndPos->x + lpWndPos->cx, lpWndPos->y + lpWndPos->cy); 1066 newWindowRect = rectWindow; 1067 } 1068 else { 1069 wndPos.hwnd = Win32Hwnd; 1070 wndPos.hwndInsertAfter = 0; 1071 newWindowRect= rectWindow; 1072 if (getParent()) mapWin32Rect(OSLIB_HWND_DESKTOP,getParent()->getOS2WindowHandle(),&newWindowRect); 1073 wndPos.x = newWindowRect.left; 1074 wndPos.y = newWindowRect.top; 1075 wndPos.cx = newWindowRect.right - newWindowRect.left; 1076 wndPos.cy = newWindowRect.bottom - newWindowRect.top; 1077 wndPos.flags = SWP_FRAMECHANGED; 1078 lpWndPos = &wndPos; 1079 } 1080 1081 return SendNCCalcSize(TRUE, &oldWindowRect, &newWindowRect, &client, &wndPos, &rectClient); 1070 1082 } 1071 1083 //****************************************************************************** … … 2537 2549 ULONG magic; 2538 2550 2539 hwndActive = OSLibWinSetActiveWindow(OS2HwndFrame); 2540 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndActive, OFFSET_WIN32WNDPTR); 2541 magic = OSLibWinGetWindowULong(hwndActive, OFFSET_WIN32PM_MAGIC); 2542 if(CheckMagicDword(magic) && win32wnd) 2543 { 2551 dprintf(("SetActiveWindow %x", getWindowHandle())); 2552 hwndActive = OSLibWinSetActiveWindow(OS2HwndFrame); 2553 win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndActive, OFFSET_WIN32WNDPTR); 2554 magic = OSLibWinGetWindowULong(hwndActive, OFFSET_WIN32PM_MAGIC); 2555 if(CheckMagicDword(magic) && win32wnd) 2556 { 2544 2557 return win32wnd->getWindowHandle(); 2545 }2546 return 0;2558 } 2559 return windowDesktop->getWindowHandle(); //pretend the desktop was active 2547 2560 } 2548 2561 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.