Changeset 8 for trunk/src/kernel/qwidget.cpp
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qwidget.cpp
r7 r8 61 61 #include "qinputcontext_p.h" 62 62 #endif 63 #if defined(Q_WS_PM) 64 #include "qt_os2.h" 65 #endif 63 66 #if defined(Q_WS_QWS) 64 67 #include "qwsmanager_qws.h" … … 513 516 QWidget utility functions 514 517 *****************************************************************************/ 515 516 518 static QFont qt_naturalWidgetFont( QWidget* w ) { 517 519 QFont naturalfont = QApplication::font( w ); … … 3259 3261 #if defined(Q_WS_WIN) 3260 3262 && GetFocus() == winId() 3263 #elif defined(Q_WS_PM) 3264 //@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems 3265 // to completely handle focus traversal itself. 3266 // && WinQueryFocus( HWND_DESKTOP ) == winId() 3261 3267 #endif 3262 3268 ) … … 3294 3300 SetFocus( winId() ); 3295 3301 else { 3302 #elif defined(Q_WS_PM) 3303 //@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems 3304 // to completely handle focus traversal itself. 3305 // if ( !topLevelWidget()->isPopup() ) 3306 // WinSetFocus( HWND_DESKTOP, winId() ); 3307 // else { 3296 3308 #endif 3297 3309 #if defined(QT_ACCESSIBILITY_SUPPORT) 3298 3310 QAccessible::updateAccessibility( this, 0, QAccessible::Focus ); 3299 3311 #endif 3300 #if defined(Q_WS_WIN) 3312 #if defined(Q_WS_WIN) // || defined(Q_WS_PM) 3301 3313 } 3302 3314 #endif … … 3345 3357 SetFocus( 0 ); 3346 3358 else { 3359 #elif defined(Q_WS_PM) 3360 //@@TODO (dmik): currently we don't use WinSetFocus(). what for? Qt seems 3361 // to completely handle focus traversal itself. 3362 // if ( !isPopup() && WinQueryFocus( HWND_DESKTOP ) == winId() ) 3363 // WinSetFocus( HWND_DESKTOP, topLevelWidget()->winId() ); 3364 // else { 3347 3365 #endif 3348 3366 #if defined(QT_ACCESSIBILITY_SUPPORT) 3349 3367 QAccessible::updateAccessibility( this, 0, QAccessible::Focus ); 3350 3368 #endif 3351 #if defined(Q_WS_WIN) 3369 #if defined(Q_WS_WIN) // || defined(Q_WS_PM) 3352 3370 } 3353 3371 #endif … … 3567 3585 } 3568 3586 #endif 3587 //@@TODO (dmik): I think we don't need the same as above in OS/2, 3588 // because if the window is active (in Qt terminology) 3589 // qApp->activeWindow() will be equal to toplevelWidget() which is 3590 // checked at the beginnig. 3569 3591 3570 3592 return FALSE; … … 3985 4007 // On Windows, show the popup now so that our own focus handling 3986 4008 // stores the correct old focus widget even if it's stolen in the showevent 4009 //@@TODO (dmik): need the same in OS/2? guess not. 3987 4010 #if defined(Q_WS_WIN) 3988 4011 if ( testWFlags(WType_Popup) ) … … 4006 4029 showWindow(); 4007 4030 4008 #if !defined(Q_WS_WIN) 4031 //@@TODO (dmik): need the same in OS/2? guess not. 4032 #if !defined(Q_WS_WIN) 4009 4033 if ( testWFlags(WType_Popup) ) 4010 4034 qApp->openPopup( this ); … … 4048 4072 qt_leave_modal( this ); 4049 4073 4050 #if defined(Q_WS_WIN) 4074 //@@TODO (dmik): is it correct for OS/2? 4075 #if defined(Q_WS_WIN) || defined(Q_WS_PM) 4051 4076 if ( isTopLevel() && !isPopup() && parentWidget() && isActiveWindow() ) 4052 4077 parentWidget()->setActiveWindow(); // Activate parent … … 4927 4952 } 4928 4953 4954 #ifndef Q_WS_PM 4955 // We disable this on OS/2 since we send these events from qt_sendBlocked() 4956 // which does it more accurately compared to the code below -- only those 4957 // widgets that have actually been blocked/unblocked (not less and not 4958 // more) will receive these events. 4929 4959 case QEvent::WindowBlocked: 4930 4960 case QEvent::WindowUnblocked: … … 4938 4968 } 4939 4969 break; 4970 #endif 4940 4971 4941 4972 default: … … 5527 5558 */ 5528 5559 bool QWidget::winEvent( MSG * ) 5560 { 5561 return FALSE; 5562 } 5563 5564 #endif 5565 #if defined(Q_WS_PM) 5566 5567 /*! 5568 This special event handler can be reimplemented in a subclass to 5569 receive native OS/2 PM events. 5570 5571 In your reimplementation of this function, if you want to stop the 5572 event being handled by Qt, return TRUE. If you return FALSE, this 5573 native event is passed back to Qt, which translates the event into 5574 a Qt event and sends it to the widget. 5575 5576 \warning This function is not portable. 5577 5578 \sa QApplication::pmEventFilter() 5579 */ 5580 bool QWidget::pmEvent( QMSG * ) 5529 5581 { 5530 5582 return FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.