vcl/qt5/QtFrame.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit feb965b13dd3d5c34b0aa62280b65f9d0bf78c23
Author: Michael Weghorn <[email protected]>
AuthorDate: Wed Mar 1 10:54:13 2023 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Thu Mar 2 09:15:58 2023 +0000
tdf#153869 qt: Unminimize window when requested
Remove the `Qt::WindowMinimized` state from the widget's
window states if the `SalFrameToTop::RestoreWhenMin`
flag is set to request restoring the minimized window.
Change-Id: I0cb67f28c1e9c3f48a9a234702a4aaa7e3ffec8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148036
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <[email protected]>
(cherry picked from commit 00a602ca8e75ab5cf050e092289ef7165b343165)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147988
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 1b9f8ae88175..554485a6b83c 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -768,7 +768,11 @@ void QtFrame::ToTop(SalFrameToTop nFlags)
if (isWindow() && !(nFlags & SalFrameToTop::GrabFocusOnly))
pWidget->raise();
if ((nFlags & SalFrameToTop::RestoreWhenMin) || (nFlags &
SalFrameToTop::ForegroundTask))
+ {
+ if (nFlags & SalFrameToTop::RestoreWhenMin)
+ pWidget->setWindowState(pWidget->windowState() &
~Qt::WindowMinimized);
pWidget->activateWindow();
+ }
else if ((nFlags & SalFrameToTop::GrabFocus) || (nFlags &
SalFrameToTop::GrabFocusOnly))
{
if (!(nFlags & SalFrameToTop::GrabFocusOnly))