- Timestamp:
- May 26, 2000, 8:43:35 PM (25 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmsgtranslate.cpp
r3603 r3610 1 /* $Id: oslibmsgtranslate.cpp,v 1.3 1 2000-05-24 19:30:05sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.32 2000-05-26 18:43:33 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 521 521 winMsg->lParam = MAKELONG(ClientPoint.x, ClientPoint.y); //client coordinates 522 522 } 523 if( ISMOUSE_CAPTURED())523 if((fMsgRemoved == MSG_REMOVE) && ISMOUSE_CAPTURED()) 524 524 { 525 525 if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) { … … 575 575 winMsg->lParam = MAKELONG(SHORT1FROMMP(os2Msg->mp1),mapY(win32wnd,SHORT2FROMMP(os2Msg->mp1))); 576 576 } 577 if( ISMOUSE_CAPTURED())577 if((fMsgRemoved == MSG_REMOVE) && ISMOUSE_CAPTURED()) 578 578 { 579 579 if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) { … … 767 767 } 768 768 } 769 if( ISKDB_CAPTURED())769 if((fMsgRemoved == MSG_REMOVE) && ISKDB_CAPTURED()) 770 770 { 771 771 if(DInputKeyBoardHandler(winMsg)) { -
trunk/src/user32/oslibwin.cpp
r3581 r3610 1 /* $Id: oslibwin.cpp,v 1.7 7 2000-05-20 14:57:19sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.78 2000-05-26 18:43:34 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 13 13 #define INCL_WIN 14 14 #define INCL_PM 15 #define INCL_WINSWITCHLIST 15 16 #include <os2wrap.h> 16 17 #include <stdlib.h> … … 84 85 if(fTaskList) 85 86 { 86 dwFrameStyle |= FCF_TASKLIST |FCF_NOMOVEWITHOWNER;87 dwFrameStyle |= FCF_NOMOVEWITHOWNER; 87 88 } 88 89 if (fShellPosition) dwFrameStyle |= FCF_SHELLPOSITION; … … 955 956 //****************************************************************************** 956 957 //****************************************************************************** 958 BOOL OSLibWinRemoveFromTasklist(HANDLE hTaskList) 959 { 960 return (WinRemoveSwitchEntry(hTaskList)) ? FALSE : TRUE; 961 } 962 //****************************************************************************** 963 //****************************************************************************** 964 HANDLE OSLibWinAddToTaskList(HWND hwndFrame, char *title, BOOL fVisible) 965 { 966 SWCNTRL swctrl; 967 ULONG tid; 968 969 swctrl.hwnd = hwndFrame; 970 swctrl.hwndIcon = 0; 971 swctrl.hprog = 0; 972 WinQueryWindowProcess(hwndFrame, (PPID)&swctrl.idProcess, (PTID)&tid); 973 swctrl.idSession = 0; 974 swctrl.uchVisibility = (fVisible) ? SWL_VISIBLE : SWL_INVISIBLE; 975 swctrl.fbJump = SWL_JUMPABLE; 976 swctrl.bProgType = PROG_PM; 977 if(title) { 978 strncpy(swctrl.szSwtitle, title, MAXNAMEL+4); 979 } 980 else { 981 swctrl.szSwtitle[0] = 0; 982 swctrl.uchVisibility = SWL_INVISIBLE; 983 } 984 return WinAddSwitchEntry(&swctrl); 985 } 986 //****************************************************************************** 987 //****************************************************************************** 988 BOOL OSLibWinChangeTaskList(HANDLE hTaskList, HWND hwndFrame, char *title, BOOL fVisible) 989 { 990 SWCNTRL swctrl; 991 ULONG tid; 992 993 swctrl.hwnd = hwndFrame; 994 swctrl.hwndIcon = 0; 995 swctrl.hprog = 0; 996 WinQueryWindowProcess(hwndFrame, (PPID)&swctrl.idProcess, (PTID)&tid); 997 swctrl.idSession = 0; 998 swctrl.uchVisibility = (fVisible) ? SWL_VISIBLE : SWL_INVISIBLE; 999 swctrl.fbJump = SWL_JUMPABLE; 1000 swctrl.bProgType = PROG_PM; 1001 if(title) { 1002 strncpy(swctrl.szSwtitle, title, MAXNAMEL+4); 1003 } 1004 else { 1005 swctrl.szSwtitle[0] = 0; 1006 swctrl.uchVisibility = SWL_INVISIBLE; 1007 } 1008 return (WinChangeSwitchEntry(hTaskList, &swctrl)) ? FALSE : TRUE; 1009 } 1010 //****************************************************************************** 1011 //****************************************************************************** -
trunk/src/user32/oslibwin.h
r3581 r3610 1 /* $Id: oslibwin.h,v 1.4 4 2000-05-20 14:57:22sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.45 2000-05-26 18:43:34 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 286 286 BOOL OSLibWinSetCapture(HWND hwnd); 287 287 288 BOOL OSLibWinRemoveFromTasklist(HANDLE hTaskList); 289 HANDLE OSLibWinAddToTaskList(HWND hwndFrame, char *title, BOOL fVisible); 290 BOOL OSLibWinChangeTaskList(HANDLE hTaskList, HWND hwndFrame, char *title, BOOL fVisible); 291 288 292 #endif //__OSLIBWIN_H__ -
trunk/src/user32/win32wbase.cpp
r3603 r3610 1 /* $Id: win32wbase.cpp,v 1.19 4 2000-05-24 19:30:06sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.195 2000-05-26 18:43:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 149 149 hClipRegion = 0; 150 150 151 hTaskList = 0; 152 151 153 if(currentProcessId == -1) 152 154 { … … 161 163 Win32BaseWindow::~Win32BaseWindow() 162 164 { 165 if(hTaskList) { 166 OSLibWinRemoveFromTasklist(hTaskList); 167 } 168 163 169 OSLibWinSetVisibleRegionNotify(OS2HwndFrame, FALSE); 164 170 OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, 0); … … 240 246 PrintWindowStyle(cs->style, cs->dwExStyle); 241 247 #endif 248 249 //If window has no owner/parent window, then it will be added to the tasklist 250 //(depending on visibility state) 251 if (!cs->hwndParent) fTaskList = TRUE; 242 252 243 253 sw = SW_SHOW; … … 501 511 502 512 OSLibWinConvertStyle(dwStyle,dwExStyle,&dwOSWinStyle); 503 #if 0504 if(((dwStyle & (WS_CAPTION|WS_POPUP)) == WS_CAPTION) && (getParent() == NULL || getParent() == windowDesktop)) {505 fTaskList = TRUE;506 }507 #else508 if (((dwStyle & (WS_CAPTION | WS_SYSMENU | 0xC0000000)) == (WS_CAPTION | WS_SYSMENU))) fTaskList = TRUE;509 #endif510 513 511 514 OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP, … … 520 523 } 521 524 OSLibWinSetVisibleRegionNotify(OS2HwndFrame, TRUE); 522 523 525 SetLastError(0); 524 526 return TRUE; … … 664 666 //Note: Solitaire crashes when receiving WM_SIZE messages before WM_CREATE 665 667 fCreated = TRUE; 668 669 if(fTaskList) { 670 hTaskList = OSLibWinAddToTaskList(OS2HwndFrame, windowNameA, (cs->style & WS_VISIBLE) ? 1 : 0); 671 } 666 672 667 673 if (SendInternalMessageA(WM_NCCREATE,0,(LPARAM)cs)) … … 1337 1343 { 1338 1344 HandleNCPaint((HRGN)1); 1339 OSLibWinSetWindowText(OS2HwndFrame,(LPSTR)windowNameA); 1345 if(hTaskList) { 1346 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 1347 } 1340 1348 } 1341 1349 … … 1795 1803 { 1796 1804 HandleNCPaint((HRGN)1); 1797 OSLibWinSetWindowText(OS2HwndFrame,(LPSTR)windowNameA); 1805 if(hTaskList) { 1806 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 1807 } 1798 1808 } 1799 1809 … … 2098 2108 2099 2109 if(showstate & SWPOS_SHOW) { 2100 setStyle(getStyle() | WS_VISIBLE); 2101 } 2102 else setStyle(getStyle() & ~WS_VISIBLE); 2103 2110 setStyle(getStyle() | WS_VISIBLE); 2111 if(hTaskList) { 2112 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 2113 } 2114 } 2115 else { 2116 if(hTaskList) { 2117 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 2118 } 2119 setStyle(getStyle() & ~WS_VISIBLE); 2120 } 2104 2121 showFlag = (nCmdShow != SW_HIDE); 2105 2122 … … 2248 2265 //SvL: TODO: Send WM_SHOWWINDOW?? 2249 2266 OSLibWinShowWindow(OS2Hwnd, SWPOS_SHOW); 2267 if(hTaskList) { 2268 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 2269 } 2250 2270 } 2251 2271 else … … 2254 2274 //SvL: TODO: Send WM_SHOWWINDOW?? 2255 2275 OSLibWinShowWindow(OS2Hwnd, SWPOS_HIDE); 2276 if(hTaskList) { 2277 OSLibWinChangeTaskList(hTaskList, OS2HwndFrame, getWindowNameA(), (getStyle() & WS_VISIBLE) ? 1 : 0); 2278 } 2256 2279 } 2257 2280 rc = OSLibWinSetMultWindowPos(&swp, 1); -
trunk/src/user32/win32wbase.h
r3603 r3610 1 /* $Id: win32wbase.h,v 1.9 5 2000-05-24 19:30:07sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.96 2000-05-26 18:43:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 389 389 390 390 PROPERTY *propertyList; 391 392 HANDLE hTaskList; //PM specific (switchentry handle) 391 393 392 394 CREATESTRUCTA *tmpcs; //temporary pointer to CREATESTRUCT used in CreateWindowEx
Note:
See TracChangeset
for help on using the changeset viewer.