diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-10-25 11:45:13 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-10-25 15:57:05 +0200 |
commit | 8043727a5882d7cc7904a79ded6c989a18b8c67a (patch) | |
tree | 49bdca5f28a1161d73c4eb396c940b838119a7f7 /vcl/qt5 | |
parent | e19b342f15178ce9f7d7b832649ee173b4b7f2ea (diff) |
Remembering window position regressed a little
since commit 8d791a9d9657f6573ce27947c0289b36c6eba77c
(Set Qt5Widget to be a central widget of QMainWindow)
Change-Id: Ifd23043312a92b260871630862f1b949851a6d89
Reviewed-on: https://gerrit.libreoffice.org/62348
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Frame.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 45c4c3ee98fd..1901877c57ea 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -429,7 +429,10 @@ void Qt5Frame::SetPosSize(long nX, long nY, long nWidth, long nHeight, sal_uInt1 maGeometry.nY = nY; m_bDefaultPos = false; - m_pQWidget->move(nX, nY); + if (m_pTopLevel) + m_pTopLevel->move(nX, nY); + else + m_pQWidget->move(nX, nY); } else if (m_bDefaultPos) Center(); @@ -530,7 +533,7 @@ bool Qt5Frame::GetWindowState(SalFrameState* pState) pState->mnMask = WindowStateMask::State; if (isMinimized() /*|| !windowHandle()*/) pState->mnState |= WindowStateState::Minimized; - else if (m_pQWidget->isMaximized()) + else if (isMaximized()) { pState->mnState |= WindowStateState::Maximized; } |