- Timestamp:
- Nov 3, 1999, 7:00:29 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmframe.cpp
r1542 r1572 1 /* $Id: pmframe.cpp,v 1.1 7 1999-11-02 17:07:25 cbratschi Exp $ */1 /* $Id: pmframe.cpp,v 1.18 1999-11-03 18:00:25 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 241 241 dprintf(("PMFRAME: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", win32wnd->getWindowHandle(), pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 242 242 243 //CB: show dialog in front of owner 244 if (win32wnd->IsModalDialogOwner()) 245 { 246 pswp->fl |= SWP_ZORDER; 247 pswp->hwndInsertBehind = win32wnd->getOS2HwndModalDialog(); 248 if (pswp->fl & SWP_ACTIVATE) 249 { 250 pswp->fl &= ~SWP_ACTIVATE; 251 WinSetWindowPos(win32wnd->getOS2HwndModalDialog(),0,0,0,0,0,SWP_ACTIVATE); 252 } 253 } 254 243 255 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 244 256 goto RunDefFrameProc; … … 394 406 return rc; 395 407 } 408 396 409 case WM_ACTIVATE: 397 410 { … … 406 419 WinSetWindowUShort(hwnd,QWS_FLAGS,mp1 ? (flags | FF_ACTIVE):(flags & ~FF_ACTIVE)); 407 420 421 //CB: show owner behind the dialog 422 if (win32wnd->IsModalDialog()) 423 { 424 Win32BaseWindow *topOwner = win32wnd->getOwner()->getTopParent(); 425 426 if (topOwner) WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER); 427 } 408 428 409 429 RestoreOS2TIB(); … … 433 453 dprintf(("PMFRAME: WM_BUTTON1DOWN")); 434 454 #endif 455 435 456 if (InSizeBox(win32wnd,(POINTS*)&mp1)) 436 457 { -
trunk/src/user32/win32dlg.cpp
r1542 r1572 1 /* $Id: win32dlg.cpp,v 1.2 7 1999-11-02 17:07:25cbratschi Exp $ */1 /* $Id: win32dlg.cpp,v 1.28 1999-11-03 18:00:26 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Dialog Code for OS/2 … … 270 270 if (!dialogFlags & DF_END) /* was EndDialog called in WM_INITDIALOG ? */ 271 271 { 272 topOwner->EnableWindow( FALSE ); 273 //CB: todo: make modal, implement modeless, remove FCF_TASKLIST 274 // emulate WinProcessDlg 275 ShowWindow( SW_SHOW ); 272 HWND hwndOldDialog; 273 BOOL bOldOwner; 274 275 fIsModalDialog = TRUE; 276 topOwner->EnableWindow(FALSE); 277 278 bOldOwner = topOwner->IsModalDialogOwner(); 279 topOwner->setModalDialogOwner(TRUE); 280 hwndOldDialog = topOwner->getOS2HwndModalDialog(); 281 topOwner->setOS2HwndModalDialog(OS2HwndFrame); 282 ShowWindow(SW_SHOW); 276 283 277 284 //CB: 100% CPU usage, need a better solution with OSLibWinGetMsg … … 327 334 } 328 335 #endif 329 topOwner->EnableWindow( TRUE ); 336 topOwner->setModalDialogOwner(bOldOwner); 337 topOwner->setOS2HwndModalDialog(hwndOldDialog); 338 if (!bOldOwner) topOwner->EnableWindow(TRUE); 330 339 } 331 340 retval = idResult; -
trunk/src/user32/win32wbase.cpp
r1542 r1572 1 /* $Id: win32wbase.cpp,v 1.7 2 1999-11-02 17:07:25cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.73 1999-11-03 18:00:27 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 135 135 fFirstShow = TRUE; 136 136 fIsDialog = FALSE; 137 fIsModalDialogOwner = FALSE; 138 OS2HwndModalDialog = 0; 137 139 fInternalMsg = FALSE; 138 140 fNoSizeMsg = FALSE; … … 213 215 } 214 216 } 215 else 217 else 216 218 if(fDestroyAll) { 217 219 dprintf(("Destroying window %x %s", getWindowHandle(), windowNameA)); 218 220 setParent(NULL); //or else we'll crash in the dtor of the ChildWindow class 219 221 } … … 433 435 if(WIDGETS_IsControl(this, BUTTON_CONTROL) && ((dwStyle & 0x0f) == BS_GROUPBOX)) 434 436 { 435 436 437 } 438 else 437 hwndLinkAfter = HWND_BOTTOM; 438 dwStyle |= WS_CLIPSIBLINGS; 439 } 440 else 439 441 if(WIDGETS_IsControl(this, STATIC_CONTROL) && !(dwStyle & WS_GROUP)) { 440 442 dwStyle |= WS_CLIPSIBLINGS; 441 443 } 442 444 … … 1992 1994 /* We can't activate a child window (WINE) */ 1993 1995 if(getStyle() & WS_CHILD) 1994 1996 showstate &= ~SWPOS_ACTIVATE; 1995 1997 1996 1998 if(showstate & SWPOS_SHOW) { -
trunk/src/user32/win32wbase.h
r1540 r1572 1 /* $Id: win32wbase.h,v 1.3 8 1999-11-01 19:11:45 sandervlExp $ */1 /* $Id: win32wbase.h,v 1.39 1999-11-03 18:00:29 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 148 148 BOOL ShowWindow(ULONG nCmdShow); 149 149 BOOL SetWindowPos(HWND hwndInsertAfter, int x, int y, int cx, int cy, UINT fuFlags); 150 150 BOOL SetWindowPlacement(WINDOWPLACEMENT *winpos); 151 151 BOOL DestroyWindow(); 152 152 HWND SetActiveWindow(); … … 165 165 BOOL IsWindow() { return TRUE; }; 166 166 BOOL IsDialog() { return fIsDialog; }; 167 BOOL IsModalDialog() { return fIsModalDialog; }; 168 BOOL IsModalDialogOwner() { return fIsModalDialogOwner; }; 169 VOID setModalDialogOwner(BOOL fMDO) { fIsModalDialogOwner = fMDO; }; 170 VOID setOS2HwndModalDialog(HWND aHwnd) { OS2HwndModalDialog = aHwnd; }; 171 HWND getOS2HwndModalDialog() { return OS2HwndModalDialog; }; 167 172 BOOL CanReceiveSizeMsgs() { return !fNoSizeMsg; }; 168 173 BOOL IsWindowDestroyed() { return fIsDestroyed; }; … … 223 228 ULONG getBorderHeight() { return borderHeight; }; 224 229 225 static 226 static 227 static 230 static void NC_AdjustRectInner(LPRECT rect, DWORD style, DWORD exStyle); 231 static void NC_AdjustRectOuter(LPRECT rect, DWORD style, BOOL menu, DWORD exStyle); 232 static BOOL WindowNeedsWMBorder( DWORD style, DWORD exStyle ); 228 233 229 234 PVOID getOldWndProc() { return pOldWndProc; } … … 265 270 BOOL fFirstShow; 266 271 BOOL fIsDialog; 272 BOOL fIsModalDialog; 273 BOOL fIsModalDialogOwner; 274 HWND OS2HwndModalDialog; 267 275 BOOL fInternalMsg; //Used to distinguish between messages 268 276 //sent by PM and those sent by apps … … 308 316 #ifndef OS2_INCLUDED 309 317 void GetMinMaxInfo(POINT *maxSize, POINT *maxPos, POINT *minTrack, POINT *maxTrack ); 310 318 LONG HandleWindowPosChanging(WINDOWPOS *winpos); 311 319 LONG HandleSysCommand(WPARAM wParam, POINT *pt32); 312 320
Note:
See TracChangeset
for help on using the changeset viewer.