[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 19 09:08:29 UTC 2021
vcl/source/window/floatwin.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit eb4fe68e21868c066b68fb399f5ec0c207b0d4ef
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 18 16:03:06 2021 +0000
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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 )
More information about the Libreoffice-commits
mailing list