From e9230b2b09a8dc0ea71263a1c321f4f63a222ac9 Mon Sep 17 00:00:00 2001 From: Mark Hung Date: Sat, 9 Apr 2016 23:45:28 +0800 Subject: tdf#48300 bring window to top and restore window when minimized. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While XWindow->ToTop() in Linux do the both for default ( None ), ToTopFlags::RestoreWhenMin has to be specified in Windows in order to restore the window, and ToTopFlags::ForegroundTask is necessary when ToTopFlags::RestoreWhenMin is specified in order to bring non-minimized window to the front. Change-Id: Ief4a825a18d874a0c35211c9022a4261da6bcf8f Reviewed-on: https://gerrit.libreoffice.org/23938 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- framework/source/loadenv/loadenv.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework') diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 6084133d75c9..5daa22367e63 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1655,7 +1655,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X } if( pWindow->IsVisible() && (bForceFrontAndFocus || bForceToFront) ) - pWindow->ToTop(); + pWindow->ToTop( ToTopFlags::RestoreWhenMin | ToTopFlags::ForegroundTask ); else pWindow->Show(true, (bForceFrontAndFocus || bForceToFront) ? ShowFlags::ForegroundTask : ShowFlags::NONE ); } -- cgit