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@redhat.com>
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 1d9bac8..b0f2dc5 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 )