- Timestamp:
- Apr 13, 2002, 8:19:31 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/pmwindow.cpp
r8129 r8256 1 /* $Id: pmwindow.cpp,v 1.17 1 2002-03-28 11:26:00 sandervlExp $ */1 /* $Id: pmwindow.cpp,v 1.172 2002-04-13 06:19:31 bird Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 193 193 194 194 fOS2Look = PROFILE_GetOdinIniBool(ODINSYSTEM_SECTION, "OS2Look", FALSE); 195 if(fOS2Look) 195 if(fOS2Look) 196 196 { 197 197 CHAR szDisplay[30]; … … 224 224 void WIN32API SetWindowAppearance(int fLooks) 225 225 { 226 if(fLooks == OS2_APPEARANCE || fLooks == OS2_APPEARANCE_SYSMENU) 226 if(fLooks == OS2_APPEARANCE || fLooks == OS2_APPEARANCE_SYSMENU) 227 227 { 228 228 CHAR szDisplay[30]; … … 231 231 SYSCOLOR_Init(FALSE); //use OS/2 colors 232 232 233 if(hbmFrameMenu[0] == 0) 233 if(hbmFrameMenu[0] == 0) 234 234 { 235 235 CHAR szDisplay[30]; … … 282 282 case WM_CREATE: 283 283 { 284 char drive[ 2];284 char drive[4]; 285 285 286 286 //skip floppy drives 287 287 drive[0] = 'C'; 288 drive[1] = 0; 288 drive[1] = ':'; 289 drive[2] = '\0'; 289 290 290 291 for(int i=2;i<26;i++) { 291 292 drives[i] = GetDriveTypeA(drive); 292 if(drives[i] == DRIVE_CDROM_W) 293 if(drives[i] == DRIVE_CDROM_W) 293 294 { 294 295 DWORD parsize = sizeof(ParameterBlock); … … 322 323 case WM_TIMER: 323 324 { 324 for(int i=0;i<26;i++) 325 for(int i=0;i<26;i++) 325 326 { 326 327 //for now only cdrom/dvd drives 327 if(drives[i] == DRIVE_CDROM_W) 328 if(drives[i] == DRIVE_CDROM_W) 328 329 { 329 330 DWORD parsize = sizeof(ParameterBlock); … … 342 343 } 343 344 //Send WM_DEVICECHANGE message when CD status changes 344 if((status & 4) != drivestatus[i]) 345 if((status & 4) != drivestatus[i]) 345 346 { 346 347 PID pidThis, pidTemp; … … 358 359 359 360 WinQueryWindowProcess(hwnd, &pidThis, NULL); 360 361 361 362 //Iterate over all child windows of the desktop 362 363 henum = WinBeginEnumWindows(HWND_DESKTOP); 363 364 364 SetWin32TIB(); 365 SetWin32TIB(); 365 366 while(hwndEnum = WinGetNextWindow(henum)) 366 367 { … … 370 371 HWND hwndWin32 = OS2ToWin32Handle(hwndEnum); 371 372 if(hwndWin32) { 372 SendMessageA(hwndWin32, 373 WM_DEVICECHANGE_W, 374 (status & 4) ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, 373 SendMessageA(hwndWin32, 374 WM_DEVICECHANGE_W, 375 (status & 4) ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, 375 376 (LPARAM)&volchange); 376 377 } … … 691 692 win32wnd->DispatchMsgA(pWinMsg); 692 693 break; 693 694 694 695 case WM_CHAR_SPECIAL: 695 696 /* NO BREAK! FALLTHRU CASE! */ 696 697 697 698 case WM_CHAR: 698 699 dprintf(("OS2: WM_CHAR %x %x %x, %x %x", win32wnd->getWindowHandle(), mp1, mp2, pWinMsg->wParam, pWinMsg->lParam)); … … 1054 1055 win32wnd->MsgPosChanging((LPARAM)&wp); 1055 1056 1056 if(win32wnd->getOldStyle() != win32wnd->getStyle()) 1057 if(win32wnd->getOldStyle() != win32wnd->getStyle()) 1057 1058 { 1058 1059 OSLibSetWindowStyle(win32wnd->getOS2FrameWindowHandle(), win32wnd->getOS2WindowHandle(), win32wnd->getStyle(), win32wnd->getExStyle()); … … 1126 1127 adjustend: 1127 1128 //The next part needs to be done for top-level windows only 1128 if(!((win32wnd->getStyle() & (WS_POPUP_W|WS_CHILD_W)) == WS_CHILD_W)) 1129 if(!((win32wnd->getStyle() & (WS_POPUP_W|WS_CHILD_W)) == WS_CHILD_W)) 1129 1130 { 1130 1131 //Setting these flags is necessary to avoid activation/focus problems … … 1132 1133 ret |= AWP_DEACTIVATE; 1133 1134 } 1134 if(ulFlags & SWP_ACTIVATE) 1135 if(ulFlags & SWP_ACTIVATE) 1135 1136 { 1136 1137 if(ulFlags & SWP_ZORDER) { … … 1151 1152 } 1152 1153 else { 1153 if(ulFlags & (SWP_ACTIVATE|SWP_FOCUSACTIVATE)) 1154 if(ulFlags & (SWP_ACTIVATE|SWP_FOCUSACTIVATE)) 1154 1155 { 1155 1156 win32wnd->MsgChildActivate(TRUE); … … 1159 1160 } 1160 1161 } 1161 else 1162 if(ulFlags & (SWP_DEACTIVATE|SWP_FOCUSDEACTIVATE)) 1162 else 1163 if(ulFlags & (SWP_DEACTIVATE|SWP_FOCUSDEACTIVATE)) 1163 1164 { 1164 1165 win32wnd->MsgChildActivate(FALSE); … … 1193 1194 win32wnd->callVisibleRgnNotifyProc(TRUE); 1194 1195 } 1195 else 1196 else 1196 1197 if(pswp->fl & SWP_HIDE) { 1197 1198 win32wnd->callVisibleRgnNotifyProc(FALSE); … … 1210 1211 if(pswp->fl & SWP_HIDE) { 1211 1212 WinShowWindow(win32wnd->getOS2WindowHandle(), 0); 1212 } 1213 } 1213 1214 //MUST call the old frame window proc! 1214 1215 goto RunDefFrameWndProc; … … 1547 1548 if(win32wnd->getOwner()) { 1548 1549 Win32BaseWindow *topOwner = Win32BaseWindow::GetWindowFromHandle(win32wnd->getOwner()->GetTopParent()); 1549 1550 1550 1551 if (topOwner) { 1551 1552 WinSetWindowPos(topOwner->getOS2FrameWindowHandle(),hwnd,0,0,0,0,SWP_ZORDER); … … 1739 1740 WinSetWindowUShort(hwnd, QWS_FLAGS, ulFrameFlags); 1740 1741 } 1741 #ifndef CUSTOM_TRACKFRAME 1742 #ifndef CUSTOM_TRACKFRAME 1742 1743 //****************************************************************************** 1743 1744 //TODO: Quickly moving a window two times doesn't force a repaint (1st time)
Note:
See TracChangeset
for help on using the changeset viewer.