From 00a602ca8e75ab5cf050e092289ef7165b343165 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 1 Mar 2023 10:54:13 +0100 Subject: 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 --- vcl/qt5/QtFrame.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vcl') 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)) -- cgit