Compare commits

...

1 Commits

Author SHA1 Message Date
Corey Berla
52e6dbe555 main: Fix focus state when using back or forward buttons
handle_pointing_event() only checks for buttons 1-5
on a mouse click release.  If you use buttons above 5
like the back and forward buttons, in many cases you'll
get a strange unfocussed window.  Add GDK_BUTTON8_MASK
and GDK_BUTTON9_MASK with checks in handle_pointing_event()

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5301
2022-10-29 08:50:31 -07:00
2 changed files with 5 additions and 1 deletions

View File

@@ -109,6 +109,8 @@ typedef enum
GDK_BUTTON3_MASK = 1 << 10,
GDK_BUTTON4_MASK = 1 << 11,
GDK_BUTTON5_MASK = 1 << 12,
GDK_BUTTON8_MASK = 1 << 15,
GDK_BUTTON9_MASK = 1 << 16,
GDK_SUPER_MASK = 1 << 26,
GDK_HYPER_MASK = 1 << 27,

View File

@@ -1471,7 +1471,9 @@ handle_pointing_event (GdkEvent *event)
GDK_BUTTON2_MASK |
GDK_BUTTON3_MASK |
GDK_BUTTON4_MASK |
GDK_BUTTON5_MASK)) == 1)
GDK_BUTTON5_MASK |
GDK_BUTTON8_MASK |
GDK_BUTTON9_MASK)) == 1)
{
GtkWidget *new_target = gtk_widget_pick (native, x, y, GTK_PICK_DEFAULT);