Changeset 3584 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- May 22, 2000, 7:21:11 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r3581 r3584 1 /* $Id: win32wbase.cpp,v 1.19 1 2000-05-20 14:57:24 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.192 2000-05-22 17:21:11 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 208 208 } 209 209 if(propertyList) { 210 210 removeWindowProps(); 211 211 } 212 212 } … … 503 503 #if 0 504 504 if(((dwStyle & (WS_CAPTION|WS_POPUP)) == WS_CAPTION) && (getParent() == NULL || getParent() == windowDesktop)) { 505 505 fTaskList = TRUE; 506 506 } 507 507 #else … … 867 867 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 868 868 if(fDestroyWindowCalled) { 869 869 return 0; 870 870 } 871 871 … … 916 916 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 917 917 if(fDestroyWindowCalled) { 918 918 return 0; 919 919 } 920 920 … … 927 927 //SvL: Don't send WM_(NC)ACTIVATE messages when the window is being destroyed 928 928 if(fDestroyWindowCalled) { 929 929 return 0; 930 930 } 931 931 return SendInternalMessageA(WM_KILLFOCUS, hwnd, 0); … … 1056 1056 RECT client = rectClient; 1057 1057 1058 1058 if ((rect.left >= client.left) && (rect.left < client.right) && 1059 1059 (rect.right >= client.left) && (rect.right < client.right) && 1060 1060 (rect.top >= client.top) && (rect.top < client.bottom) && 1061 1061 (rect.bottom >= client.top) && (rect.bottom < client.bottom)) 1062 1062 { 1063 1064 } 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 } 1076 else 1063 return 0; 1064 } 1065 1066 dprintf(("MsgNCPaint (%d,%d)(%d,%d)", rect.left, rect.top, rect.right, rect.bottom)); 1067 hrgn = CreateRectRgnIndirect(&rect); 1068 if (!hrgn) return 0; 1069 1070 rc = SendInternalMessageA(WM_NCPAINT,hrgn,0); 1071 1072 DeleteObject(hrgn); 1073 1074 return rc; 1075 } 1076 else return 0; 1077 1077 } 1078 1078 //****************************************************************************** … … 1329 1329 if ((dwStyle & WS_CAPTION) == WS_CAPTION) 1330 1330 { 1331 //HandleNCPaint((HRGN)1);1331 HandleNCPaint((HRGN)1); 1332 1332 OSLibWinSetWindowText(OS2HwndFrame,(LPSTR)windowNameA); 1333 1333 } … … 1638 1638 if((HIWORD(lParam) & KEYDATA_ALT) && wParam) 1639 1639 { 1640 if (wParam == VK_TAB || wParam == VK_ESCAPE) 1641 1640 if (wParam == VK_TAB || wParam == VK_ESCAPE) 1641 break; 1642 1642 if (wParam == VK_SPACE && (getStyle() & WS_CHILD)) { 1643 1644 1643 getParent()->SendMessageA(Msg, wParam, lParam ); 1644 } 1645 1645 else SendMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam ); 1646 1646 } 1647 1647 else /* check for Ctrl-Esc */ 1648 1649 1648 if (wParam != VK_ESCAPE) MessageBeep(0); 1649 break; 1650 1650 } 1651 1651 … … 2037 2037 ULONG showstate = 0; 2038 2038 HWND hWinAfter; 2039 BOOL rc ;2039 BOOL rc,wasVisible,showFlag; 2040 2040 2041 2041 dprintf(("ShowWindow %x %x", getWindowHandle(), nCmdShow)); … … 2048 2048 break; 2049 2049 case SW_HIDE: 2050 if (!wasVisible) return wasVisible; 2051 if(GetCapture() == getWindowHandle() || IsChild(GetCapture())) 2052 ReleaseCapture(); 2053 2050 2054 showstate = SWPOS_HIDE; 2051 2055 break; … … 2077 2081 2078 2082 /* We can't activate a child window (WINE) */ 2079 if( getStyle() & WS_CHILD)2083 if((getStyle() & WS_CHILD) && !(getExStyle() & WS_EX_MDICHILD)) 2080 2084 showstate &= ~SWPOS_ACTIVATE; 2081 2085 … … 2085 2089 else setStyle(getStyle() & ~WS_VISIBLE); 2086 2090 2091 showFlag = (nCmdShow != SW_HIDE); 2092 2087 2093 rc = OSLibWinShowWindow(OS2HwndFrame, showstate); 2088 2094 OSLibWinShowWindow(OS2Hwnd, showstate); 2089 2095 2090 SendInternalMessageA(WM_SHOWWINDOW, (showstate & SWPOS_SHOW) ? 1 : 0, 0); 2096 //CB: PMFrame: WM_MINMAXFRAME SWP_* handling isn't always successful! 2097 if ((showstate & SWPOS_MAXIMIZE) == SWPOS_MAXIMIZE) 2098 setStyle((getStyle() & ~WS_MINIMIZE) | WS_MAXIMIZE); 2099 else if ((showstate & SWPOS_MINIMIZE) == SWPOS_MINIMIZE) 2100 setStyle((getStyle() & ~WS_MAXIMIZE) | WS_MINIMIZE); 2101 else if ((showstate & SWPOS_RESTORE) == SWPOS_RESTORE) 2102 setStyle(getStyle() & ~(WS_MINIMIZE | WS_MAXIMIZE)); 2091 2103 2092 2104 if (flags & WIN_NEED_SIZE) … … 2140 2152 else 2141 2153 { 2142 if (!(fuFlags & SWP_SHOWWINDOW)) 2143 2144 2145 } 2146 2147 if(cx < 0) cx = 0; 2154 if (!(fuFlags & SWP_SHOWWINDOW)) 2155 fuFlags |= SWP_NOREDRAW; 2156 fuFlags &= ~SWP_HIDEWINDOW; 2157 } 2158 2159 if(cx < 0) cx = 0; 2148 2160 if(cy < 0) cy = 0; 2149 2161 … … 2159 2171 fuFlags |= SWP_NOACTIVATE; /* Already active */ 2160 2172 } 2161 else 2173 else 2162 2174 if((getStyle() & (WS_POPUP | WS_CHILD)) != WS_CHILD ) 2163 2175 { … … 2165 2177 { 2166 2178 fuFlags &= ~SWP_NOZORDER; 2167 hwndInsertAfter = HWND_TOP;2179 hwndInsertAfter = HWND_TOP; 2168 2180 } 2169 2181 } … … 2219 2231 2220 2232 if(fuFlags & SWP_SHOWWINDOW && !IsWindowVisible()) { 2221 2222 2223 2233 setStyle(getStyle() | WS_VISIBLE); 2234 //SvL: TODO: Send WM_SHOWWINDOW?? 2235 OSLibWinShowWindow(OS2Hwnd, SWPOS_SHOW); 2224 2236 } 2225 2237 else 2226 2238 if(fuFlags & SWP_HIDEWINDOW && IsWindowVisible()) { 2227 2228 2229 2239 setStyle(getStyle() & ~WS_VISIBLE); 2240 //SvL: TODO: Send WM_SHOWWINDOW?? 2241 OSLibWinShowWindow(OS2Hwnd, SWPOS_HIDE); 2230 2242 } 2231 2243 rc = OSLibWinSetMultWindowPos(&swp, 1); … … 2233 2245 #ifdef DEBUG 2234 2246 if(fShow) { 2235 2247 dprintf(("Frame style 0x%08x, client style 0x%08x", OSLibQueryWindowStyle(OS2HwndFrame), OSLibQueryWindowStyle(OS2Hwnd))); 2236 2248 } 2237 2249 #endif … … 2306 2318 { 2307 2319 SetWindowPos(0, 0, 0, 0, 0, SWP_HIDEWINDOW | 2308 2320 SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE); 2309 2321 if(!::IsWindow(hwnd)) 2310 2322 { 2311 2323 return TRUE; 2312 2324 } 2313 2325 } … … 2674 2686 rc = (getStyle() & WS_DISABLED) != 0; 2675 2687 if(rc && !fEnable) { 2676 2688 SendMessageA(WM_CANCELMODE, 0, 0); 2677 2689 } 2678 2690 OSLibWinEnableWindow(OS2HwndFrame, fEnable); 2679 2691 if(fEnable == FALSE) { 2680 2681 2682 2683 2684 2692 //SvL: No need to clear focus as PM already does this 2693 if(getWindowHandle() == GetCapture()) { 2694 ReleaseCapture(); /* A disabled window can't capture the mouse */ 2695 dprintf(("Released capture for window %x that is being disabled", getWindowHandle())); 2696 } 2685 2697 } 2686 2698 return rc; … … 2984 2996 } 2985 2997 //****************************************************************************** 2986 //Note: Should return NULL if window is frame window! (IsOS2FrameWindowHandle depends on this 2998 //Note: Should return NULL if window is frame window! (IsOS2FrameWindowHandle depends on this 2987 2999 // behaviour) 2988 3000 //****************************************************************************** … … 3060 3072 3061 3073 if(window->getOS2FrameWindowHandle() == hwndOS2) { 3062 3074 return TRUE; 3063 3075 } 3064 3076 return FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.