summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorCarlos Manuel Duclos Vergara <carlos.duclos@nokia.com>2010-07-23 15:03:42 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-08-18 12:20:41 (GMT)
commit1ddbd9a855926d17e7de86c993a5f7d9e57c3401 (patch)
tree3939531d14050e43c045c65e6fe4e60b08895db3 /src/gui
parent7f7efe034902f98d5125343f7176491c7b503729 (diff)
downloadQt-1ddbd9a855926d17e7de86c993a5f7d9e57c3401.zip
Qt-1ddbd9a855926d17e7de86c993a5f7d9e57c3401.tar.gz
Qt-1ddbd9a855926d17e7de86c993a5f7d9e57c3401.tar.bz2
Drawer widget in a MainWindow disappears after returning from full screen mode.
The problem was in the toggleDrawer function. We were not checking the status of the last transition before setting the new transition, so all the transition were treated as non-intentional. Task-number: QTBUG-11373 Reviewed-by: Prasanth (cherry picked from commit 725d8e061ededee9a5ddf0914aabd0f6aa2ee741)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e57ec77..c2af6af 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1599,12 +1599,14 @@ void QWidgetPrivate::toggleDrawers(bool visible)
continue;
QWidget *widget = static_cast<QWidget*>(object);
if(qt_mac_is_macdrawer(widget)) {
+ bool oldState = widget->testAttribute(Qt::WA_WState_ExplicitShowHide);
if(visible) {
if (!widget->testAttribute(Qt::WA_WState_ExplicitShowHide))
widget->show();
} else {
widget->hide();
- widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
+ if(!oldState)
+ widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
}
}
}