diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-02-01 11:06:11 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2023-02-09 14:38:39 +0100 |
commit | 3356823ca2264b35d4ac7b072d94a42f9ab1b582 (patch) | |
tree | 76b8b847265824d4803429d4505c1cef15979ae9 /src/x11 | |
parent | b321d545b157c51ac1a10438823591817ac46cab (diff) | |
download | mutter-3356823ca2264b35d4ac7b072d94a42f9ab1b582.tar.gz |
x11: Reset ignored crossing serials from X11 code
They are only ever set and ignored from X11 code, we can also move
this bit of sloppy/mouse mode handling to the X11 parts.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2828>
Diffstat (limited to 'src/x11')
-rw-r--r-- | src/x11/events.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/x11/events.c b/src/x11/events.c index 874126d09..0708c5edf 100644 --- a/src/x11/events.c +++ b/src/x11/events.c @@ -934,6 +934,19 @@ crossing_serial_is_ignored (MetaX11Display *x11_display, return FALSE; } +static void +reset_ignored_crossing_serials (MetaX11Display *x11_display) +{ + int i; + + i = 0; + while (i < N_IGNORED_CROSSING_SERIALS) + { + x11_display->display->ignored_crossing_serials[i] = 0; + ++i; + } +} + static gboolean handle_input_xevent (MetaX11Display *x11_display, XIEvent *input_event, @@ -986,6 +999,12 @@ handle_input_xevent (MetaX11Display *x11_display, enter_event->time, enter_event->root_x, enter_event->root_y); + + if (window->type != META_WINDOW_DOCK) + { + /* stop ignoring stuff */ + reset_ignored_crossing_serials (x11_display); + } } break; case XI_Leave: |