- Timestamp:
- May 15, 2001, 4:31:40 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r5685 r5713 1 /* $Id: oslibmsgtranslate.cpp,v 1.5 0 2001-05-11 08:39:43sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.51 2001-05-15 14:31:38 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 192 192 TEB *teb = (TEB *)pTeb; 193 193 BOOL fWasDisabled = FALSE; 194 BOOL fIsFrame = FALSE; 194 195 int i; 195 196 … … 198 199 if(!win32wnd) { 199 200 win32wnd = Win32BaseWindow::GetWindowFromOS2FrameHandle(os2Msg->hwnd); 201 if(win32wnd) { 202 fIsFrame = TRUE; 203 } 200 204 } 201 205 … … 276 280 LONG xDelta = pswp->cx - swpOld.cx; 277 281 282 if(!fIsFrame) goto dummymessage; 283 278 284 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto dummymessage; 279 285 … … 294 300 if (!win32wnd->CanReceiveSizeMsgs()) goto dummymessage; 295 301 296 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 297 ///// dprintf(("Set client rectangle to (%d,%d)(%d,%d)", swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy)); 298 ///// win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 299 302 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) 303 { 300 304 teb->o.odin.wp.hwnd = win32wnd->getWindowHandle(); 301 305 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) -
trunk/src/user32/oslibwin.cpp
r5685 r5713 1 /* $Id: oslibwin.cpp,v 1.9 2 2001-05-11 08:39:43sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.93 2001-05-15 14:31:38 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 153 153 BOOL OSLibWinAlarm(HWND hwndDeskTop,ULONG flStyle) 154 154 { 155 return WinAlarm(hwndDeskTop,flStyle);155 return WinAlarm(hwndDeskTop,flStyle); 156 156 } 157 157 //****************************************************************************** … … 159 159 APIRET OSLibDosBeep(ULONG freg,ULONG dur) 160 160 { 161 return DosBeep(freg,dur);161 return DosBeep(freg,dur); 162 162 } 163 163 //****************************************************************************** … … 165 165 HWND OSLibWinQueryFocus(HWND hwndDeskTop) 166 166 { 167 return WinQueryFocus(hwndDeskTop);167 return WinQueryFocus(hwndDeskTop); 168 168 } 169 169 //****************************************************************************** … … 171 171 HWND OSLibWinWindowFromID(HWND hwndParent,ULONG id) 172 172 { 173 return WinWindowFromID(hwndParent,id);173 return WinWindowFromID(hwndParent,id); 174 174 } 175 175 //****************************************************************************** … … 177 177 BOOL OSLibWinSetFocus(HWND hwndDeskTop,HWND hwndNewFocus, BOOL activate) 178 178 { 179 return WinFocusChange (hwndDeskTop, hwndNewFocus, activate ? FC_NOLOSEACTIVE : 0);179 return WinFocusChange (hwndDeskTop, hwndNewFocus, activate ? 0 : FC_NOSETACTIVE); 180 180 } 181 181 //****************************************************************************** … … 183 183 BOOL OSLibWinIsChild (HWND hwnd, HWND hwndOf) 184 184 { 185 return WinIsChild (hwnd, hwndOf);185 return WinIsChild (hwnd, hwndOf); 186 186 } 187 187 //****************************************************************************** … … 189 189 ULONG OSLibGetWindowHeight(HWND hwnd) 190 190 { 191 RECTL rect;192 193 return (WinQueryWindowRect(hwnd,&rect)) ? rect.yTop-rect.yBottom:0;191 RECTL rect; 192 193 return (WinQueryWindowRect(hwnd,&rect)) ? rect.yTop-rect.yBottom:0; 194 194 } 195 195 //****************************************************************************** … … 197 197 LONG OSLibWinQuerySysValue(LONG iSysValue) 198 198 { 199 return WinQuerySysValue(HWND_DESKTOP,iSysValue);199 return WinQuerySysValue(HWND_DESKTOP,iSysValue); 200 200 } 201 201 //****************************************************************************** … … 203 203 ULONG OSLibWinQueryDlgItemText(HWND hwndDlg,ULONG idItem,LONG cchBufferMax,char* pchBuffer) 204 204 { 205 return WinQueryDlgItemText(hwndDlg,idItem,cchBufferMax,pchBuffer);205 return WinQueryDlgItemText(hwndDlg,idItem,cchBufferMax,pchBuffer); 206 206 } 207 207 //****************************************************************************** … … 209 209 BOOL OSLibWinSetDlgItemText(HWND hwndDlg,ULONG idItem,char* pszText) 210 210 { 211 return WinSetDlgItemText(hwndDlg,idItem,pszText);211 return WinSetDlgItemText(hwndDlg,idItem,pszText); 212 212 } 213 213 //****************************************************************************** … … 215 215 BOOL OSLibWinQueryPointerPos(PPOINT pptlPoint) 216 216 { 217 return WinQueryPointerPos(HWND_DESKTOP,(PPOINTL)pptlPoint);217 return WinQueryPointerPos(HWND_DESKTOP,(PPOINTL)pptlPoint); 218 218 } 219 219 //****************************************************************************** … … 221 221 BOOL OSLibWinSetPointerPos(int x, int y) 222 222 { 223 return WinSetPointerPos(HWND_DESKTOP, x, y);223 return WinSetPointerPos(HWND_DESKTOP, x, y); 224 224 } 225 225 //****************************************************************************** … … 227 227 HWND OSLibWinQueryWindow(HWND hwnd, ULONG lCode) 228 228 { 229 return WinQueryWindow(hwnd, lCode);229 return WinQueryWindow(hwnd, lCode); 230 230 } 231 231 //****************************************************************************** -
trunk/src/user32/pmwindow.cpp
r5698 r5713 1 /* $Id: pmwindow.cpp,v 1.1 29 2001-05-12 08:25:56sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.130 2001-05-15 14:31:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 125 125 (PFNWP)Win32FrameWindowProc, /* Address of window procedure */ 126 126 CS_FRAME, 127 FrameClassInfo.cbWindowData +NROF_WIN32WNDBYTES))127 FrameClassInfo.cbWindowData)) 128 128 { 129 129 dprintf(("WinRegisterClass Win32BaseWindow failed %x", WinGetLastError(hab))); … … 145 145 DevCloseDC(hdc); 146 146 147 dprintf(("InitPM: Desktop (%d,%d) ", ScreenWidth, ScreenHeight));147 dprintf(("InitPM: Desktop (%d,%d) bpp %d", ScreenWidth, ScreenHeight, ScreenBitsPerPel)); 148 148 return TRUE; 149 149 } /* End of main */ … … 310 310 //must delay this function call 311 311 //mp1 = win32 window handle 312 //mp2 = activate flag313 dprintf(("USER32: Delayed SetFocus %x %x call!", teb->o.odin.hwndFocus, mp1));312 //mp2 = top parent if activation required 313 dprintf(("USER32: Delayed SetFocus %x %x %x call!", teb->o.odin.hwndFocus, mp1, mp2)); 314 314 if(teb->o.odin.hwndFocus) { 315 315 win32wnd = Win32BaseWindow::GetWindowFromHandle(teb->o.odin.hwndFocus); 316 316 if(win32wnd) { 317 WinFocusChange(HWND_DESKTOP, win32wnd->getOS2WindowHandle(), (mp2) ? FC_NOLOSEACTIVE : 0); 317 if(mp2) { 318 SetActiveWindow((HWND)mp2); 319 } 320 if(!IsWindow(win32wnd->getWindowHandle())) break; //abort if window destroyed 321 WinFocusChange(HWND_DESKTOP, win32wnd->getOS2WindowHandle(), FC_NOSETACTIVE); 318 322 } 319 323 else DebugInt3(); … … 578 582 { 579 583 //WM_CREATE handled during client window creation 584 dprintf(("PMFRAME: WM_CREATE %x")); 580 585 goto RunDefFrameWndProc; 581 586 } … … 584 589 { 585 590 RECTL rectl; 586 587 591 588 592 HPS hps = WinBeginPaint(hwnd, NULL, &rectl); … … 1350 1354 RunDefWndProc: 1351 1355 RestoreOS2TIB(); 1352 //calling WinDefWindowProc here break Opera hotlist window (WM_ADJUSTWINDOWPOS)1356 //calling WinDefWindowProc here breaks Opera hotlist window (WM_ADJUSTWINDOWPOS) 1353 1357 // return pfnFrameWndProc(hwnd, msg, mp1, mp2); 1354 1358 return WinDefWindowProc( hwnd, msg, mp1, mp2 ); -
trunk/src/user32/win32wbase.cpp
r5685 r5713 1 /* $Id: win32wbase.cpp,v 1.25 5 2001-05-11 08:39:45sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.256 2001-05-15 14:31:39 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 3138 3138 BOOL rc; 3139 3139 3140 dprintf(("Win32BaseWindow::EnableWindow %x %d", getWindowHandle(), fEnable));3141 //return true if previous state was disabled, else false (sdk docs)3142 rc = (getStyle() & WS_DISABLED) != 0;3143 if(rc && !fEnable) {3140 dprintf(("Win32BaseWindow::EnableWindow %x %d", getWindowHandle(), fEnable)); 3141 //return true if previous state was disabled, else false (sdk docs) 3142 rc = (getStyle() & WS_DISABLED) != 0; 3143 if(rc && !fEnable) { 3144 3144 SendMessageA(WM_CANCELMODE, 0, 0); 3145 }3146 OSLibWinEnableWindow(OS2HwndFrame, fEnable);3147 if(fEnable == FALSE) {3145 } 3146 OSLibWinEnableWindow(OS2HwndFrame, fEnable); 3147 if(fEnable == FALSE) { 3148 3148 //SvL: No need to clear focus as PM already does this 3149 3149 if(getWindowHandle() == GetCapture()) { … … 3151 3151 dprintf(("Released capture for window %x that is being disabled", getWindowHandle())); 3152 3152 } 3153 }3154 return rc;3153 } 3154 return rc; 3155 3155 } 3156 3156 //****************************************************************************** -
trunk/src/user32/window.cpp
r5698 r5713 1 /* $Id: window.cpp,v 1.9 7 2001-05-12 08:25:57sandervl Exp $ */1 /* $Id: window.cpp,v 1.98 2001-05-15 14:31:40 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 39 39 #include <heapstring.h> 40 40 #include <winuser32.h> 41 #include "hook.h" 41 42 42 43 #define DBG_LOCALLOG DBG_window … … 715 716 HWND WIN32API SetFocus(HWND hwnd) 716 717 { 717 Win32BaseWindow *window; 718 Win32BaseWindow *window, *topparent; 719 Win32BaseWindow *oldfocuswnd; 718 720 HWND lastFocus, lastFocus_W, hwnd_O; 719 721 BOOL activate; … … 739 741 else lastFocus = OSLibWinQueryFocus (OSLIB_HWND_DESKTOP); 740 742 741 activate = ((hwnd_O == lastFocus) || OSLibWinIsChild (lastFocus, hwnd_O)); 743 topparent = window->GetTopParent(); 744 activate = FALSE; 742 745 lastFocus_W = OS2ToWin32Handle (lastFocus); 743 744 dprintf(("SetFocus %x (%x) -> %x (%x)\n", lastFocus_W, lastFocus, hwnd, hwnd_O)); 746 if(lastFocus_W) { 747 oldfocuswnd = Win32BaseWindow::GetWindowFromHandle(lastFocus_W); 748 if(lastFocus_W != hwnd && topparent != oldfocuswnd->GetTopParent()) { 749 activate = TRUE; 750 } 751 } 752 else activate = TRUE; 753 754 dprintf(("SetFocus %x (%x) -> %x (%x) act %d", lastFocus_W, lastFocus, hwnd, hwnd_O, activate)); 755 756 if(HOOK_CallHooksA(WH_CBT, HCBT_SETFOCUS, hwnd, (LPARAM)lastFocus_W)) { 757 dprintf(("hook cancelled SetFocus call!")); 758 return 0; 759 } 745 760 746 761 //PM doesn't allow SetFocus calls during WM_SETFOCUS message processing; … … 750 765 teb->o.odin.hwndFocus = hwnd; 751 766 //mp1 = win32 window handle 752 //mp2 = activate flag753 OSLibPostMessageDirect(hwnd_O, WIN32APP_SETFOCUSMSG, hwnd, activate);767 //mp2 = top parent if activation required 768 OSLibPostMessageDirect(hwnd_O, WIN32APP_SETFOCUSMSG, hwnd, (activate) ? topparent->getWindowHandle() : 0); 754 769 return lastFocus_W; 755 770 } 756 771 teb->o.odin.hwndFocus = 0; 757 return (OSLibWinSetFocus (OSLIB_HWND_DESKTOP, hwnd_O, activate)) ? lastFocus_W : 0; 772 if(activate) { 773 SetActiveWindow(topparent->getWindowHandle()); 774 } 775 if(!IsWindow(hwnd)) return FALSE; //abort if window destroyed 776 777 return (OSLibWinSetFocus(OSLIB_HWND_DESKTOP, hwnd_O, 0)) ? lastFocus_W : 0; 758 778 } 759 779 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.