From 4ab07563a764af1c0d7cac4eee734d5d5b28fa0f Mon Sep 17 00:00:00 2001 From: Rafael Siejakowski Date: Tue, 3 May 2022 18:35:13 +0200 Subject: [PATCH] Ensure actual focus for a newly opened dialog Ensure that the child widgets of a freshly opened dialog can be immediately traversed with the Tab key. Currently, the contents of each dialog are repackaged into a Gtk::ScrolledWindow for the purpose of better controlling the scrolling behaviour. This ScrolledWindow must not steal the focus from the widgets that the user cares about. Fixes https://gitlab.com/inkscape/inkscape/-/issues/3482 --- src/ui/dialog/dialog-notebook.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/dialog/dialog-notebook.cpp b/src/ui/dialog/dialog-notebook.cpp index eb64d4e639..4356098001 100644 --- a/src/ui/dialog/dialog-notebook.cpp +++ b/src/ui/dialog/dialog-notebook.cpp @@ -290,6 +290,7 @@ void DialogNotebook::add_page(Gtk::Widget &page, Gtk::Widget &tab, Glib::ustring wrapper->set_propagate_natural_height(true); wrapper->set_valign(Gtk::ALIGN_FILL); wrapper->set_overlay_scrolling(false); + wrapper->set_can_focus(false); wrapper->get_style_context()->add_class("noborder"); auto *wrapperbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL,0)); wrapperbox->set_valign(Gtk::ALIGN_FILL); -- GitLab