Changeset 77 for trunk/src/kernel/qwidget_pm.cpp
- Timestamp:
- Apr 2, 2006, 12:41:47 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel/qwidget_pm.cpp
r75 r77 64 64 // defined in qapplication_pm.cpp 65 65 extern void qt_sendBlocked( QObject *obj, QWidget *modal, QEvent *e, bool override ); 66 #if !defined (QT_NO_SESSIONMANAGER) 67 extern bool qt_about_to_destroy_wnd; 68 #endif 66 69 67 70 static QWidget *mouseGrb = 0; … … 598 601 #endif 599 602 603 /*! 604 * \internal 605 * For some unknown reason, PM sends WM_SAVEAPPLICATION to every window 606 * being destroyed, which makes it indistinguishable from WM_SAVEAPPLICATION 607 * sent to top level windows during system shutdown. We use our own version of 608 * WinDestroyWindow() and a special flag (qt_about_to_destroy_wnd) to 609 * distinguish it in qapplication_pm.cpp. 610 */ 611 static BOOL qt_WinDestroyWindow( HWND hwnd ) 612 { 613 #if !defined (QT_NO_SESSIONMANAGER) 614 qt_about_to_destroy_wnd = TRUE; 615 #endif 616 BOOL rc = WinDestroyWindow( hwnd ); 617 #if !defined (QT_NO_SESSIONMANAGER) 618 qt_about_to_destroy_wnd = FALSE; 619 #endif 620 return rc; 621 } 622 600 623 static void removeSysMenuAccels( HWND frame ) 601 624 { … … 808 831 fcData.idResources = 0; 809 832 #if !defined(QT_NO_DEBUG) && defined(QT_DEBUGWINCREATEDESTROY) 810 qDebug( 811 "|Creating top level window [%s] (frame):\n" 812 "| owner = %08lX\n" 813 "| title = '%s'\n" 814 "| style = %08lX\n" 815 "| fcFlags = %08lX", 816 name(), ownerw, title, fStyle, fcFlags 817 ); 833 qDebug ( "|Creating top level window [%s/%s] (frame):\n" 834 "| owner = %08lX\n" 835 "| title = '%s'\n" 836 "| style = %08lX\n" 837 "| fcFlags = %08lX", 838 name(), this->className(), ownerw, title, fStyle, fcFlags ); 818 839 #endif 819 840 fId = WinCreateWindow( … … 838 859 // create client 839 860 #if !defined(QT_NO_DEBUG) && defined(QT_DEBUGWINCREATEDESTROY) 840 qDebug( 841 "|Creating top level window [%s] (client):\n" 842 "| owner & parent = %08lX\n" 843 "| class = '%s'\n" 844 "| title = '%s'\n" 845 "| style = %08lX", 846 name(), fId, pszClassName, title, style 847 ); 861 qDebug( "|Creating top level window [%s/%s] (client):\n" 862 "| owner & parent = %08lX\n" 863 "| class = '%s'\n" 864 "| title = '%s'\n" 865 "| style = %08lX", 866 name(), this->className(), fId, pszClassName, title, style ); 848 867 #endif 849 868 // note that we place the client on top (HWND_TOP) to exclude other … … 855 874 } else { 856 875 #if !defined(QT_NO_DEBUG) && defined(QT_DEBUGWINCREATEDESTROY) 857 qDebug( 858 "|Creating top level window [%s]:\n" 859 "| owner = %08lX\n" 860 "| class = '%s'\n" 861 "| title = '%s'\n" 862 "| style = %08lX", 863 name(), ownerw, pszClassName, title, style 864 ); 876 qDebug( "|Creating top level window [%s/%s]:\n" 877 "| owner = %08lX\n" 878 "| class = '%s'\n" 879 "| title = '%s'\n" 880 "| style = %08lX", 881 name(), this->className(), ownerw, pszClassName, title, style ); 865 882 #endif 866 883 id = WinCreateWindow( … … 894 911 HWND parentw = parentWidget()->winId(); 895 912 #if !defined(QT_NO_DEBUG) && defined(QT_DEBUGWINCREATEDESTROY) 896 qDebug( 897 "|Creating child window [%s]:\n" 898 "| owner & parent = %08lX\n" 899 "| class = '%s'\n" 900 "| title = '%s'\n" 901 "| style = %08lX", 902 name(), parentw, pszClassName, title, style 903 ); 913 qDebug( "|Creating child window [%s/%s]:\n" 914 "| owner & parent = %08lX\n" 915 "| class = '%s'\n" 916 "| title = '%s'\n" 917 "| style = %08lX", 918 name(), this->className(), parentw, pszClassName, title, style ); 904 919 #endif 905 920 id = WinCreateWindow( … … 998 1013 } 999 1014 #if !defined(QT_NO_DEBUG) && defined(QT_DEBUGWINCREATEDESTROY) 1000 qDebug( 1001 "|Destroying window:\n" 1002 "| hwnd = %08lX", 1003 id 1004 ); 1005 #endif 1006 WinDestroyWindow( id ); 1015 qDebug( "|Destroying window [%s/%s]:\n" 1016 "| hwnd = %08lX", 1017 name(), className(), id ); 1018 #endif 1019 qt_WinDestroyWindow( id ); 1007 1020 } 1008 1021 setWinId( 0 ); … … 1128 1141 show(); 1129 1142 if ( old_winfid ) 1130 WinDestroyWindow( old_winfid );1143 qt_WinDestroyWindow( old_winfid ); 1131 1144 1132 1145 reparentFocusWidgets( oldtlw ); // fix focus chains
Note:
See TracChangeset
for help on using the changeset viewer.