[mutter/wip/carlosg/accelerators-on-correct-device] core: Use source device on ::accelerator-activated



commit 78560b84263254e5e9dcbd3b8b7610cd9f3756a0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jul 8 16:23:26 2019 +0200

    core: Use source device on ::accelerator-activated
    
    Using the master device, as we did, won't yield the expected result when
    looking up the device node (it comes NULL as this is a virtual device).
    Use the slave device, as the g-s-d machinery essentially expects.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/678

 src/core/display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 1d06863eb..4f56673b9 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2621,8 +2621,10 @@ meta_display_accelerator_activate (MetaDisplay     *display,
                                    guint            action,
                                    ClutterKeyEvent *event)
 {
-  g_signal_emit (display, display_signals[ACCELERATOR_ACTIVATED],
-                 0, action, event->device, event->time);
+  g_signal_emit (display, display_signals[ACCELERATOR_ACTIVATED], 0,
+                 action,
+                 clutter_event_get_source_device ((ClutterEvent *) event),
+                 event->time);
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]