diff options
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtksalmenu.cxx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 7a4f7a151a22..178b0ac6aa30 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3052,9 +3052,10 @@ void GtkSalFrame::signalSetFocus(GtkWindow*, GtkWidget* pWidget, gpointer frame) { // change of focus between native widgets within the toplevel GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); - bool bGainFocus = pWidget == GTK_WIDGET(pThis->m_pFixedContainer); - pThis->CallCallbackExc(bGainFocus ? SalEvent::GetFocus : SalEvent::LoseFocus, nullptr); - gtk_widget_set_can_focus(GTK_WIDGET(pThis->m_pFixedContainer), bGainFocus); + // 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); + gtk_widget_set_can_focus(GTK_WIDGET(pThis->m_pFixedContainer), !bLoseFocus); } gboolean GtkSalFrame::signalMap(GtkWidget *, GdkEvent*, gpointer frame) diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx index d53b2ef513bb..13a7ef2d30ac 100644 --- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx @@ -800,6 +800,8 @@ void GtkSalMenu::CreateMenuBarWidget() gtk_grid_attach(pGrid, mpMenuBarContainerWidget, 0, 0, 1, 1); mpMenuAllowShrinkWidget = gtk_scrolled_window_new(nullptr, nullptr); + // tdf#129634 don't allow this scrolled window as a candidate to tab into + gtk_widget_set_can_focus(GTK_WIDGET(mpMenuAllowShrinkWidget), false); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(mpMenuAllowShrinkWidget), GTK_SHADOW_NONE); // tdf#116290 external policy on scrolledwindow will not show a scrollbar, // but still allow scrolled window to not be sized to the child content. |