vcl/source/window/floatwin.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit eb4fe68e21868c066b68fb399f5ec0c207b0d4ef Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jan 18 16:03:06 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 19 10:07:45 2021 +0100 Related: tdf#135617 grab focus after shown which allows the final gtk widget to be grabbed after its parent toplevel window has been shown Change-Id: I0d6229ae027073a50cc930b3affc131d7d78fc30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 1d9bac8c427c..b0f2dc51bb6b 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -819,15 +819,17 @@ void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopu ImplSVData* pSVData = ImplGetSVData(); mpNextFloat = pSVData->mpWinData->mpFirstFloat; pSVData->mpWinData->mpFirstFloat = this; - if (nFlags & FloatWinPopupFlags::GrabFocus) + bool bGrabFocus(nFlags & FloatWinPopupFlags::GrabFocus); + if (bGrabFocus) { // force key input even without focus (useful for menus) mbGrabFocus = true; mxPrevFocusWin = Window::SaveFocus(); mpWindowImpl->mpFrameData->mbHasFocus = true; - GrabFocus(); } Show( true, ShowFlags::NoActivate ); + if (bGrabFocus) + GrabFocus(); } void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits