Changeset 61 for trunk/src/kernel/qapplication_pm.cpp
- Timestamp:
- Feb 6, 2006, 10:43:39 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qapplication_pm.cpp
r52 r61 43 43 44 44 #include "qapplication.h" 45 //@@TODO (dmik): need?46 //#if defined(QT_NON_COMMERCIAL)47 //#include "qnc_win.h"48 //#endif49 45 #include "private/qapplication_p.h" 50 46 #include "qwidget.h" … … 606 602 } 607 603 608 //@@TODO (dmik): later (guess remove)609 //Q_EXPORT HINSTANCE qWinAppInst() // get Windows app handle610 //{611 // return appInst;612 //}613 //614 //Q_EXPORT HINSTANCE qWinAppPrevInst() // get Windows prev app handle615 //{616 // return appPrevInst;617 //}618 //619 //Q_EXPORT int qWinAppCmdShow() // get main window show command620 //{621 // return appCmdShow;622 //}623 624 604 Q_EXPORT HPS qt_display_ps() // get display PS 625 605 { … … 1054 1034 // } 1055 1035 // */ 1056 1057 //@@TODO (dmik): need?1058 //#if defined(QT_NON_COMMERCIAL)1059 // QT_NC_WNDPROC1060 //#endif1061 1036 1062 1037 if ( qt_pmEventFilter( &qmsg, rc ) ) // send through app filter … … 1392 1367 bool window_state_change = FALSE; 1393 1368 PSWP pswp = (PSWP) mp1; 1394 //@@TODO (dmik): need?1395 //#if defined(QT_NON_COMMERCIAL)1396 // QT_NC_SYSCOMMAND1397 //#endif1398 1369 if ( pswp->fl & SWP_MAXIMIZE ) { 1399 1370 window_state_change = TRUE; … … 1432 1403 } 1433 1404 1434 //@@TODO (dmik): remove, we processed these in the message above. 1435 //@@TODO (dmik): what to do with QWhatsThis?.. 1436 // case WM_SYSCOMMAND: { 1437 //#ifndef Q_OS_TEMP 1438 // bool window_state_change = FALSE; 1439 // switch( wParam ) { 1440 // case SC_CONTEXTHELP: 1441 //#ifndef QT_NO_WHATSTHIS 1442 // QWhatsThis::enterWhatsThisMode(); 1443 //#endif 1444 // QT_WA( { 1445 // DefWindowProc( hwnd, WM_NCPAINT, 1, 0 ); 1446 // } , { 1447 // DefWindowProcA( hwnd, WM_NCPAINT, 1, 0 ); 1448 // } ); 1449 // break; 1450 //#if defined(QT_NON_COMMERCIAL) 1451 // QT_NC_SYSCOMMAND 1452 //#endif 1453 // case SC_MAXIMIZE: 1454 // window_state_change = TRUE; 1455 // widget->clearWState(Qt::WState_Minimized); 1456 // widget->setWState(Qt::WState_Maximized); 1457 // result = FALSE; 1458 // break; 1459 // case SC_MINIMIZE: 1460 // window_state_change = TRUE; 1461 // widget->setWState(Qt::WState_Minimized); 1462 // if ( widget->isVisible() ) { 1463 // QHideEvent e; 1464 // qt_sendSpontaneousEvent( widget, &e ); 1465 // widget->hideChildren( TRUE ); 1466 // } 1467 // result = FALSE; 1468 // break; 1469 // case SC_RESTORE: 1470 // window_state_change = TRUE; 1471 // if (widget->isMinimized()) { 1472 // widget->clearWState(Qt::WState_Minimized); 1473 // widget->showChildren( TRUE ); 1474 // QShowEvent e; 1475 // qt_sendSpontaneousEvent( widget, &e ); 1476 // } else { 1477 // widget->clearWState(Qt::WState_Maximized); 1478 // } 1479 // result = FALSE; 1480 // break; 1481 // default: 1482 // result = FALSE; 1483 // break; 1484 // } 1485 // 1486 // if (window_state_change) { 1487 // QEvent e(QEvent::WindowStateChange); 1488 // qt_sendSpontaneousEvent(widget, &e); 1489 // } 1490 //#endif 1491 // 1492 // break; 1493 // } 1494 1495 //@@TODO (dmik): later 1405 /// @todo (dmik) later 1496 1406 // case WM_SETTINGCHANGE: 1497 1407 // if ( !msg.wParam ) { … … 1552 1462 1553 1463 case WM_ACTIVATE: 1554 //@@TODO (dmik): remove 1555 //qDebug("WM_ACTIVATE: [%s] %d", widget->name(), SHORT1FROMMP(mp1) ); 1464 #if 0 1465 qDebug( "WM_ACTIVATE: [%s] %d", widget->name(), SHORT1FROMMP(mp1) ); 1466 #endif 1556 1467 qApp->pmFocus( widget, SHORT1FROMMP(mp1) ); 1557 1468 break; 1558 1469 1559 1470 case WM_SETFOCUS: 1560 //@@TODO (dmik): remove 1561 //qDebug("WM_SETFOCUS: [%s] %s [%s]", widget->name(), 1562 // SHORT1FROMMP(mp2) ? "<=" : "=>", 1563 // QWidget::find( (HWND)mp1 ) ? QWidget::find( (HWND)mp1 )->name() : "{foreign}" 1564 //); 1471 #if 0 1472 qDebug( "WM_SETFOCUS: [%s] %s [%s]", widget->name(), 1473 SHORT1FROMMP(mp2) ? "<=" : "=>", 1474 QWidget::find( (HWND)mp1 ) ? QWidget::find( (HWND)mp1 )->name() 1475 : "{foreign}" ); 1476 #endif 1565 1477 result = FALSE; 1566 1478 if ( !SHORT1FROMMP(mp2) ) { … … 1589 1501 break; 1590 1502 1591 //@@TODO (dmik): remove, handled in OS/2 version of WM_SETFOCUS above 1592 // case WM_ACTIVATE: 1593 // if ( QApplication::activePopupWidget() && LOWORD(wParam) == WA_INACTIVE && 1594 // QWidget::find((HWND)lParam) == 0 ) { 1595 // // Another application was activated while our popups are open, 1596 // // then close all popups. In case some popup refuses to close, 1597 // // we give up after 1024 attempts (to avoid an infinite loop). 1598 // int maxiter = 1024; 1599 // QWidget *popup; 1600 // while ( (popup=QApplication::activePopupWidget()) && maxiter-- ) 1601 // popup->close(); 1602 // } 1603 // qApp->winFocus( widget, LOWORD(wParam) == WA_INACTIVE ? 0 : 1 ); 1604 // break; 1605 1606 //@@TODO (dmik): later 1503 /// @todo (dmik) remove? 1607 1504 //#ifndef Q_OS_TEMP 1608 1505 // case WM_MOUSEACTIVATE: … … 1623 1520 result = FALSE; 1624 1521 break; 1625 // @@TODO (dmik):remove later1522 /// @todo (dmik) remove later 1626 1523 // case WM_SHOWWINDOW: 1627 1524 //#ifndef Q_OS_TEMP … … 1656 1553 RETURN(0); // always handled 1657 1554 1658 // @@TODO (dmik):it seems we don't need this1555 /// @todo (dmik) it seems we don't need this 1659 1556 // case WM_DESTROY: // destroy window 1660 1557 // if ( hwnd == curWin ) { … … 3364 3261 #endif 3365 3262 3366 // convert region y coordinates from GPI to Qt (see qregion_pm.cpp) 3367 POINTL ptl = { 0, -height() }; 3368 GpiOffsetRegion( hps, hrgn, &ptl ); 3369 // create a non-null region 3370 QRegion rgn( FALSE ); 3371 // destructor will delete rgn 3372 rgn.data->rgn = hrgn; 3373 3374 QPaintEvent e( 3375 rgn, 3376 QRect( rcl.xLeft, rcl.yBottom, rcl.xRight, rcl.yTop ), 3377 erase 3378 ); 3263 // create a region that will take ownership of hrgn 3264 QRegion rgn( hrgn, height() ); 3265 3266 QPaintEvent e( rgn, QRect( rcl.xLeft, rcl.yBottom, rcl.xRight, rcl.yTop ), 3267 erase ); 3379 3268 QApplication::sendSpontaneousEvent( this, (QEvent*) &e ); 3380 3269 … … 3455 3344 } 3456 3345 QPoint newCPos( swp.x, swp.y ); 3457 //@@TODO (dmik): should it apply to OS/2?3458 // // Ignore silly Windows move event to wild pos after iconify.3459 // if ( !isMinimized() && newCPos != oldPos ) {3460 3346 if ( newCPos != oldPos ) { 3461 3347 cr.moveTopLeft( newCPos );
Note:
See TracChangeset
for help on using the changeset viewer.