Changeset 115
- Timestamp:
- Aug 10, 2006, 8:19:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/kernel/qapplication_pm.cpp ¶
r110 r115 74 74 75 75 extern void qt_ensure_pm(); 76 77 /// @todo (dmik) how we can use buttons 4 and 5 on OS/2?78 //// support for xbuttons79 //#ifndef WM_XBUTTONDOWN80 //#define WM_XBUTTONDOWN 0x020B81 //#define WM_XBUTTONUP 0x020C82 //#define WM_XBUTTONDBLCLK 0x020D83 //#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))84 //#define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))85 //#define XBUTTON1 0x000186 //#define XBUTTON2 0x000287 //#define MK_XBUTTON1 0x002088 //#define MK_XBUTTON2 0x004089 //#endif90 76 91 77 /// @todo (dmik) hmm, extended keys under OS/2? … … 497 483 #endif // QT_DEBUG 498 484 499 // No message boxes but important ones500 //@@TODO (dmik): configuring error popups per process is not usual practice501 // in OS/2 (since global AUTOFAIL/SUPPRESSPOPUPS control this). remove it?502 DosError( FERR_DISABLEHARDERR | FERR_ENABLEEXCEPTION );503 504 485 // Ensure we are in PM mode 505 486 qt_ensure_pm(); 506 // Force creation of the main event loopto make it possible to507 // create windows before the application inv ikes exec()487 // Force creation of the main event queue to make it possible to 488 // create windows before the application invokes exec() 508 489 QApplication::eventLoop(); 509 510 511 //@@TODO (dmik): do we need appInst anywhere? if yes, make it obtaining its512 // value using the return value of qt_ensure_pm() since it also uses PIB.513 // if ( appInst == 0 ) {514 // PPIB ppib;515 // DosGetInfoBlocks( NULL, &ppib );516 // appInst = ppib->pib_hmte;517 // }518 490 519 491 // Misc. initialization … … 540 512 qt_set_pm_resources(); 541 513 542 // @@TODO (dmik):remove?514 /// @todo (dmik) remove? 543 515 // QInputContext::init(); 544 516 } … … 1021 993 // flip y coordinate 1022 994 qmsg.ptl.y = QApplication::desktop()->height() - (qmsg.ptl.y + 1); 1023 1024 /// @todo (dmik) do we need this?1025 // /*1026 // // sometimes the autograb is not released, so the clickevent is sent1027 // // to the wrong window. We ignore this for now, because it doesn't1028 // // cause any problems.1029 // if ( msg.message == WM_LBUTTONDOWN || msg.message == WM_RBUTTONDOWN || msg.message == WM_MBUTTONDOWN ) {1030 // HWND handle = WindowFromPoint( msg.pt );1031 // if ( msg.hwnd != handle ) {1032 // msg.hwnd = handle;1033 // hwnd = handle;1034 // }1035 // }1036 // */1037 995 1038 996 if ( qt_pmEventFilter( &qmsg, rc ) ) // send through app filter … … 1132 1090 case WM_BUTTON2DOWN: 1133 1091 case WM_BUTTON3DOWN: 1134 /// @todo (dmik) later (extra buttons)1135 // case WM_XBUTTONDOWN:1136 1092 if ( ignoreNextMouseReleaseEvent ) 1137 1093 ignoreNextMouseReleaseEvent = FALSE; … … 1140 1096 case WM_BUTTON2UP: 1141 1097 case WM_BUTTON3UP: 1142 /// @todo (dmik) later (extra buttons)1143 // case WM_XBUTTONUP:1144 1098 if ( ignoreNextMouseReleaseEvent ) { 1145 1099 ignoreNextMouseReleaseEvent = FALSE; … … 1381 1335 //#endif 1382 1336 1383 /// @todo (dmik) later 1337 /// @todo (dmik) later (WM_KBDLAYERCHANGED (0xBD4)?) 1384 1338 // case WM_SETTINGCHANGE: 1385 1339 // if ( !msg.wParam ) { … … 1391 1345 // break; 1392 1346 // 1393 //#ifndef Q_OS_TEMP1394 // case WM_NCLBUTTONDBLCLK:1395 // if ( wParam == HTCAPTION ) {1396 // bool window_state_changed = FALSE;1397 // if ( widget->isMaximized() ) {1398 // window_state_changed = TRUE;1399 // widget->clearWState(Qt::WState_Maximized);1400 // } else if (widget->testWFlags(Qt::WStyle_Maximize)){1401 // window_state_changed = TRUE;1402 // widget->setWState(Qt::WState_Maximized);1403 // }1404 //1405 // if (window_state_changed) {1406 // QEvent e(QEvent::WindowStateChange);1407 // qt_sendSpontaneousEvent(widget, &e);1408 // }1409 // }1410 // result = FALSE;1411 // break;1412 //#endif1413 1347 case WM_PAINT: // paint event 1414 1348 result = widget->translatePaintEvent( qmsg ); 1415 1349 break; 1416 1350 case WM_ERASEBACKGROUND: // erase window background 1417 #if defined (QT_PM_NO_WIDGETMASK)1418 1351 // flush WM_PAINT messages here to update window contents 1419 1352 // instantly while tracking the resize frame (normally these … … 1426 1359 // clients only, so we would have to do all calculations ourselves). 1427 1360 WinUpdateWindow( widget->winId() ); 1428 #else1429 // We flush WM_PAINT messages in QETWidget::translateConfigEvent().1430 #endif1431 1361 RETURN( FALSE ); 1432 1362 break; … … 2420 2350 type = (QEvent::Type)mouseTbl[++i]; // event type 2421 2351 button = mouseTbl[++i]; // which button 2422 /// @todo (dmik) later (extra buttons)2423 // if ( button > Qt::MidButton ) {2424 // switch( GET_XBUTTON_WPARAM( msg.wParam ) ) {2425 // case XBUTTON1:2426 // button = Qt::MidButton*2; //### XButton1;2427 // break;2428 // case XBUTTON2:2429 // button = Qt::MidButton*4; //### XButton2;2430 // break;2431 // }2432 // }2433 2352 state = translateButtonState( SHORT2FROMMP(qmsg.mp2), type, button ); // button state 2434 2353 … … 3361 3280 if ( !testWFlags( WStaticContents ) ) 3362 3281 repaint( !testWFlags(WResizeNoErase) ); 3363 #if !defined (QT_PM_NO_WIDGETMASK)3364 // Flush WM_PAINT messages here to update window contents3365 // instantly while tracking the resize frame (normally these3366 // messages are delivered after resizing is stopped for some3367 // time). It makes resizing a bit slower but gives a better look3368 // (no invalid window contents can be seen during resize).3369 // The alternative could be to erase the background only3370 // (similarly to Win32), but we need to do it for every3371 // non-toplevel window, which can be also time-consuming3372 WinUpdateWindow( winId() );3373 #endif3374 3282 } else { 3375 3283 QResizeEvent *e = new QResizeEvent( newSize, oldSize );
Note:
See TracChangeset
for help on using the changeset viewer.