diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2019-05-27 16:07:48 -0500 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2019-05-29 20:09:40 +0000 |
commit | e2bea4807313b556aa774e22fb0585a8403ff52a (patch) | |
tree | 3ffcb6e8dbafc30480cc95f37fdc77df0eb8f0ca | |
parent | bbfaf8204bb888f65d991d7364bc312039ec8241 (diff) | |
download | mutter-e2bea4807313b556aa774e22fb0585a8403ff52a.tar.gz |
display: Emit 'grab-op-end' signal after ungrab happened
We're currently emitting the 'grab-op-end' signal when the grab prerequisites
are met, but when display->grab_op is still set to a not-NONE value and thus
meta_display_get_grab_op() would return that in the signal callback.
And more importantly when this is emitted, devices are still grabbed.
Instead, emit this signal as soon as we've unset all the grab properties and
released the devices.
Helps with https://gitlab.gnome.org/GNOME/gnome-shell/issues/1326
https://gitlab.gnome.org/GNOME/mutter/merge_requests/596
-rw-r--r-- | src/core/display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/display.c b/src/core/display.c index ae5bc2caf..704ec1662 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1837,9 +1837,6 @@ meta_display_end_grab_op (MetaDisplay *display, g_assert (grab_window != NULL); - g_signal_emit (display, display_signals[GRAB_OP_END], 0, - display, grab_window, grab_op); - /* We need to reset this early, since the * meta_window_grab_op_ended callback relies on this being * up to date. */ @@ -1891,6 +1888,9 @@ meta_display_end_grab_op (MetaDisplay *display, if (meta_is_wayland_compositor ()) meta_display_sync_wayland_input_focus (display); + + g_signal_emit (display, display_signals[GRAB_OP_END], 0, + display, grab_window, grab_op); } /** |