equal
deleted
inserted
replaced
68 |
68 |
69 #if defined(Q_WS_WINCE) |
69 #if defined(Q_WS_WINCE) |
70 #include "qguifunctions_wince.h" |
70 #include "qguifunctions_wince.h" |
71 QT_USE_NAMESPACE |
71 QT_USE_NAMESPACE |
72 extern void qt_wince_maximize(QWidget *widget); //defined in qguifunctions_wince.cpp |
72 extern void qt_wince_maximize(QWidget *widget); //defined in qguifunctions_wince.cpp |
|
73 extern void qt_wince_unmaximize(QWidget *widget); //defined in qguifunctions_wince.cpp |
73 extern void qt_wince_minimize(HWND hwnd); //defined in qguifunctions_wince.cpp |
74 extern void qt_wince_minimize(HWND hwnd); //defined in qguifunctions_wince.cpp |
74 extern void qt_wince_full_screen(HWND hwnd, bool fullScreen, UINT swpf); //defined in qguifunctions_wince.cpp |
75 extern void qt_wince_full_screen(HWND hwnd, bool fullScreen, UINT swpf); //defined in qguifunctions_wince.cpp |
75 extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp |
76 extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp |
76 #endif |
77 #endif |
77 |
78 |
542 |
543 |
543 |
544 |
544 void QWidget::destroy(bool destroyWindow, bool destroySubWindows) |
545 void QWidget::destroy(bool destroyWindow, bool destroySubWindows) |
545 { |
546 { |
546 Q_D(QWidget); |
547 Q_D(QWidget); |
|
548 d->aboutToDestroy(); |
547 if (!isWindow() && parentWidget()) |
549 if (!isWindow() && parentWidget()) |
548 parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); |
550 parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); |
549 d->deactivateWidgetCleanup(); |
551 d->deactivateWidgetCleanup(); |
550 if (testAttribute(Qt::WA_WState_Created)) { |
552 if (testAttribute(Qt::WA_WState_Created)) { |
551 setAttribute(Qt::WA_WState_Created, false); |
553 setAttribute(Qt::WA_WState_Created, false); |
1164 if (IsZoomed(q->internalWinId())) |
1166 if (IsZoomed(q->internalWinId())) |
1165 data.window_state |= Qt::WindowMaximized; |
1167 data.window_state |= Qt::WindowMaximized; |
1166 // This is to resolve the problem where popups are opened from the |
1168 // This is to resolve the problem where popups are opened from the |
1167 // system tray and not being implicitly activated |
1169 // system tray and not being implicitly activated |
1168 if (q->windowType() == Qt::Popup && |
1170 if (q->windowType() == Qt::Popup && |
1169 (!q->parentWidget() || !q->parentWidget()->isActiveWindow())) |
1171 !q->parentWidget() && !qApp->activeWindow()) |
1170 q->activateWindow(); |
1172 q->activateWindow(); |
1171 } |
1173 } |
1172 |
1174 |
1173 winSetupGestures(); |
1175 winSetupGestures(); |
1174 |
1176 |
2073 QApplicationPrivate::RegisterTouchWindow(q->effectiveWinId(), 0); |
2075 QApplicationPrivate::RegisterTouchWindow(q->effectiveWinId(), 0); |
2074 } |
2076 } |
2075 |
2077 |
2076 void QWidgetPrivate::winSetupGestures() |
2078 void QWidgetPrivate::winSetupGestures() |
2077 { |
2079 { |
2078 #if !defined(QT_NO_NATIVE_GESTURES) |
2080 #if !defined(QT_NO_GESTURES) && !defined(QT_NO_NATIVE_GESTURES) |
2079 Q_Q(QWidget); |
2081 Q_Q(QWidget); |
2080 if (!q || !q->isVisible() || !nativeGesturePanEnabled) |
2082 if (!q || !q->isVisible() || !nativeGesturePanEnabled) |
2081 return; |
2083 return; |
2082 |
2084 |
2083 if (!QApplicationPrivate::HasTouchSupport) |
2085 if (!QApplicationPrivate::HasTouchSupport) |