vcl/qt5/Qt5Frame.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit d7e335018979e4c6d56f5f6ef152fcef1dd5ad9b Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Thu Mar 14 22:35:38 2019 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Mar 19 00:01:06 2019 +0100 tdf#119718: give focus where focus is due shamelessly copied X11SalFrame behaviour with different ToTopFlags: focus central widget with GrabFocus and GrabFocusOnly, activate window when coming back from minimized (RestoreWhenMin) or coming back to foreground (ForegroundTask) Change-Id: I4d43a00f0a9034e661303c39a1b522def85ab6f5 Reviewed-on: https://gerrit.libreoffice.org/69285 Tested-by: Jenkins Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> (cherry picked from commit 39396a2e4362608c792cf3bdde447b66c75d64d6) Reviewed-on: https://gerrit.libreoffice.org/69402 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 334466770fd1..57a2cb219b52 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -640,8 +640,10 @@ void Qt5Frame::ToTop(SalFrameToTop nFlags) if (isWindow() && !(nFlags & SalFrameToTop::GrabFocusOnly)) pWidget->raise(); - pWidget->setFocus(); - pWidget->activateWindow(); + if ((nFlags & SalFrameToTop::RestoreWhenMin) || (nFlags & SalFrameToTop::ForegroundTask)) + pWidget->activateWindow(); + else if ((nFlags & SalFrameToTop::GrabFocus) || (nFlags & SalFrameToTop::GrabFocusOnly)) + m_pQWidget->setFocus(); } void Qt5Frame::SetPointer(PointerStyle ePointerStyle) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits