[evince/BUG_menubutton_focus_on_click] EvToolbar: set menu button to not focus-on-click
- From: Nelson Benítez León <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/BUG_menubutton_focus_on_click] EvToolbar: set menu button to not focus-on-click
- Date: Thu, 2 Apr 2020 19:14:09 +0000 (UTC)
commit 78b5ef0601cf4e9c56c5795b27399e6fcf2265e7
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Thu Apr 2 14:36:16 2020 -0400
EvToolbar: set menu button to not focus-on-click
Gtk3 has just merged a commit that makes all
GtkMenuButton's to not focus-on-click, because
as a general rule, all buttons that launch a
menu should not grab focus on click, because
otherwise when the menu is closed the focus goes
back to the button instead of the previously
focused widget, which is the one the user was
interacting with.
Because the Gtk fix will be in next 3.24
release and Evince requires >= 3.22 let's
apply this easy fix to Evince now.
Fixes #1339
shell/ev-toolbar.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/shell/ev-toolbar.c b/shell/ev-toolbar.c
index 44a293dc..a91c7c86 100644
--- a/shell/ev-toolbar.c
+++ b/shell/ev-toolbar.c
@@ -140,6 +140,7 @@ ev_toolbar_create_menu_button (EvToolbar *ev_toolbar,
button = gtk_menu_button_new ();
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+ gtk_widget_set_focus_on_click (button, FALSE);
gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ());
gtk_image_set_from_icon_name (GTK_IMAGE (gtk_button_get_image (GTK_BUTTON (button))),
icon_name, GTK_ICON_SIZE_MENU);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]