tdf#129634 ignore floating toolbars

Change-Id: Id51f14f75e6547532d9742ef3420e10d06974a17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87957
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 6096dbd..ce2ed4f 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3058,6 +3058,10 @@ void GtkSalFrame::signalSetFocus(GtkWindow*, GtkWidget* pWidget, gpointer frame)
        return;
    // change of focus between native widgets within the toplevel
    GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
    // tdf#129634 ignore floating toolbars
    if (pThis->m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
        return;

    // tdf#129634 interpret losing focus as focus passing explicitly to another widget
    bool bLoseFocus = pWidget && pWidget != GTK_WIDGET(pThis->m_pFixedContainer);
    pThis->CallCallbackExc(bLoseFocus ? SalEvent::LoseFocus : SalEvent::GetFocus, nullptr);