summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Frame.cxx
diff options
context:
space:
mode:
authorAleksei Nikiforov <darktemplar@basealt.ru>2018-12-14 12:39:44 +0300
committerJan-Marek Glogowski <glogow@fbihome.de>2018-12-18 19:40:11 +0100
commit4aa66236d69c63b648a966de2e2d7a3f12eed8de (patch)
tree4ada3e83065d0114ab824fb2f9b8dc5f59cbcfe6 /vcl/qt5/Qt5Frame.cxx
parent5658da22f77a48599bb20cf6c7c37abf0388186e (diff)
Qt5: Fix fullscreen window size
Allow setting Qt5Object's position and size Change-Id: I9f70b68ff402a3975e36baca4d81103603110d82 Reviewed-on: https://gerrit.libreoffice.org/65309 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5/Qt5Frame.cxx')
-rw-r--r--vcl/qt5/Qt5Frame.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 87637916fe79..41e2be0fc54b 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -70,6 +70,7 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
, m_bInDrag(false)
, m_bDefaultSize(true)
, m_bDefaultPos(true)
+ , m_bFullScreen(false)
{
Qt5Instance* pInst = static_cast<Qt5Instance*>(GetSalData()->m_pInstance);
pInst->insertFrame(this);
@@ -380,7 +381,11 @@ Size Qt5Frame::CalcDefaultSize()
else
qSize = QApplication::desktop()->screenGeometry(0).size();
- return bestmaxFrameSizeForScreenSize(toSize(qSize));
+ Size aSize = toSize(qSize);
+ if (!m_bFullScreen)
+ aSize = bestmaxFrameSizeForScreenSize(aSize);
+
+ return aSize;
}
void Qt5Frame::SetDefaultSize()
@@ -562,13 +567,15 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen)
// only top-level windows can go fullscreen
assert(m_pTopLevel);
+ m_bFullScreen = bFullScreen;
+
// show it if it isn't shown yet
if (!isWindow())
m_pTopLevel->show();
// do that before going fullscreen
SetScreenNumber(nScreen);
- bFullScreen ? windowHandle()->showFullScreen() : windowHandle()->showNormal();
+ m_bFullScreen ? windowHandle()->showFullScreen() : windowHandle()->showNormal();
}
void Qt5Frame::StartPresentation(bool)