vcl/qt5/Qt5Frame.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 39396a2e4362608c792cf3bdde447b66c75d64d6 Author: Katarina Behrens <katarina.behr...@cib.de> AuthorDate: Thu Mar 14 22:35:38 2019 +0100 Commit: Katarina Behrens <katarina.behr...@cib.de> CommitDate: Sat Mar 16 13:26:42 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> diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx index 9a41cf38bf8b..b4d1a985e2ce 100644 --- a/vcl/qt5/Qt5Frame.cxx +++ b/vcl/qt5/Qt5Frame.cxx @@ -655,8 +655,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