summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Frame.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2019-02-26 15:07:51 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2019-03-04 17:15:18 +0100
commite8e274b50658e1f9c2f40ce05249f7c857aeba64 (patch)
treee69bbf4d3a4e7986ad9dd98593d6e5c273c5cf9d /vcl/qt5/Qt5Frame.cxx
parentd66dbe0f9de76405052352d6bfc369a7c2b0a8e3 (diff)
tdf#120791: restore window geometry coming back from fullscreen
Change-Id: I1492423fe6110bdc79aa68c715e968770f6767ab Reviewed-on: https://gerrit.libreoffice.org/68672 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/qt5/Qt5Frame.cxx')
-rw-r--r--vcl/qt5/Qt5Frame.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 958d9250c776..81d47c98d39b 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -612,9 +612,19 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen)
if (!isWindow())
m_pTopLevel->show();
- // do that before going fullscreen
- SetScreenNumber(nScreen);
- m_bFullScreen ? windowHandle()->showFullScreen() : windowHandle()->showNormal();
+ if (m_bFullScreen)
+ {
+ m_aRestoreGeometry = m_pTopLevel->geometry();
+ // do that before going fullscreen
+ SetScreenNumber(nScreen);
+ windowHandle()->showFullScreen();
+ }
+ else
+ {
+ windowHandle()->showNormal();
+ m_pTopLevel->setGeometry(m_aRestoreGeometry);
+ m_aRestoreGeometry = QRect();
+ }
}
void Qt5Frame::StartPresentation(bool)