- Timestamp:
- Nov 13, 2006, 12:28:25 AM (19 years ago)
- Location:
- trunk/src/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qapplication_pm.cpp
r153 r154 2075 2075 } 2076 2076 2077 static inline bool isChildOf( QWidget * child, QWidget * parent ) 2078 { 2079 if ( !parent || !child ) 2080 return FALSE; 2081 QWidget * w = child; 2082 while( w && w != parent ) 2083 w = w->parentWidget(); 2084 return w != 0; 2085 } 2086 2077 2087 Q_EXPORT void qt_enter_modal( QWidget *widget ) 2078 2088 { … … 2084 2094 if ( qt_modal_stack->containsRef( widget ) ) 2085 2095 return; // already modal 2096 2097 QWidget *m = qt_modal_stack->first(); 2098 while ( m ) { 2099 if ( isChildOf( m, widget ) ) 2100 return; // child is already modal (prevent endless recursion) 2101 m = qt_modal_stack->next(); 2102 } 2086 2103 2087 2104 //@@TODO (dmik): Qt/Win32 sends WindowBlocked/WindowUnblocked events only -
trunk/src/kernel/qwidget_pm.cpp
r153 r154 1165 1165 if ( 1166 1166 topModal && this != topModal && parentWidget() != topModal && 1167 isTopLevel() && !testWFlags( WGroupLeader ) 1167 isTopLevel() && !testWFlags( WGroupLeader ) && 1168 !testWFlags( WShowModal ) // don't block if we're going to be modal 1168 1169 ) 1169 1170 blockedBy = topModal;
Note:
See TracChangeset
for help on using the changeset viewer.