- Timestamp:
- Mar 26, 2006, 8:14:05 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/qwidget.h
r64 r75 601 601 #if !defined (QT_PM_NO_WIDGETMASK) 602 602 void validateObstacles(); 603 LONG combineObstacles( HRGN hrgn, LONG op );604 603 #endif 605 604 enum ClipMode { ClipDefault, Unclipped, ClipAll }; -
trunk/src/kernel/qwidget_pm.cpp
r64 r75 109 109 } 110 110 111 /** \internal flags for qt_WinProcessWindowObstacles() */ 111 112 enum { 112 113 PWO_Children = 0x01, 113 114 PWO_Sibings = 0x02, 114 115 PWO_Ancestors = 0x04, 115 PWO_All = PWO_Children | PWO_Sibings | PWO_Ancestors, 116 PWO_TopLevel = 0x80000000, 117 // PWO_Default is suitable in most cases (for simple paint operations) 118 PWO_Default = PWO_Children | PWO_Sibings | PWO_Ancestors, 116 119 }; 117 120 … … 226 229 */ 227 230 static LONG qt_WinProcessWindowObstacles( HWND hwnd, PRECTL prcl, HRGN hrgn, 228 LONG op, LONG flags = PWO_ All)231 LONG op, LONG flags = PWO_Default ) 229 232 { 230 233 Q_ASSERT( hwnd ); … … 336 339 while ( parent != desktop ) { 337 340 HWND grandParent = WinQueryWindow( parent, QW_PARENT ); 338 // no need to clip top-level windows (that cannot be non-rectangular 339 // and thus are always correctly clipped by the system) 340 if ( grandParent == desktop ) 341 break; 341 if ( !(flags & PWO_TopLevel) ) { 342 // When PWO_TopLevel is not specified, top-level windows 343 // (children of the desktop) are not processed. It makes sense 344 // when qt_WinProcessWindowObstacles() is used to clip out 345 // overlying windows during regular paint operations (WM_PAINT 346 // processing or drawing in a window directly through 347 // WinGetPS()): in this case, top-level windows are always 348 // correctly clipped out by the system (because they cannot be 349 // non-rectangular). 350 if ( grandParent == desktop ) 351 break; 352 } 342 353 343 354 WinQueryWindowPos( parent, &swp ); … … 837 848 #endif 838 849 // note that we place the client on top (HWND_TOP) to exclude other 839 // frame controls from being analy sed in qt_WinProcessWindowObstacles850 // frame controls from being analyzed in qt_WinProcessWindowObstacles 840 851 id = WinCreateWindow( 841 852 fId, pszClassName, title, style, 0, 0, 0, 0, … … 1865 1876 HRGN hrgnObst = GpiCreateRegion( hps, 0, NULL ); 1866 1877 qt_WinProcessWindowObstacles( winId(), &rclAff, hrgnObst, CRGN_OR, 1867 PWO_Sibings | PWO_Ancestors ); 1878 PWO_Sibings | PWO_Ancestors | 1879 PWO_TopLevel ); 1868 1880 // shift region of obstacles and affected region back to 1869 1881 // parent coords … … 2312 2324 } 2313 2325 2314 int pwoFlags = PWO_Ancestors | PWO_Sibings ;2326 int pwoFlags = PWO_Ancestors | PWO_Sibings | PWO_TopLevel; 2315 2327 if ( clip ) 2316 2328 pwoFlags |= PWO_Children; … … 2758 2770 } 2759 2771 2760 /*!2761 * \internal2762 *2763 * Combines areas of this widget covered by (intersected with) its children2764 * and sibling widgets to a region \a hrgn using an operation \a op2765 * (see GpiCombineRegion()). Returns the complexity of the combined region.2766 *2767 * Clip regions of all relative widgets (set by WinSetClipRegion()) are taken2768 * into account.2769 */2770 /// @todo (dmik) is it really necessary somewhere?2771 LONG QWidget::combineObstacles( HRGN hrgn, LONG op )2772 {2773 return qt_WinProcessWindowObstacles( winId(), NULL, hrgn, op );2774 }2775 2776 2772 #endif // !defined (QT_PM_NO_WIDGETMASK) 2777 2773
Note:
See TracChangeset
for help on using the changeset viewer.