[mutter] display: Emit 'grab-op-end' signal after ungrab happened
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Emit 'grab-op-end' signal after ungrab happened
- Date: Wed, 29 May 2019 20:14:48 +0000 (UTC)
commit e2bea4807313b556aa774e22fb0585a8403ff52a
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon May 27 16:07:48 2019 -0500
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
src/core/display.c | 6 +++---
1 file 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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]