[mutter] display: Export the timestamp of the event as well



commit 56fb8a81b3fc7a17cedc08be31e7231ff28f7e77
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jul 25 14:13:27 2013 +0200

    display: Export the timestamp of the event as well
    
    When passing on keybindings, make sure to pass the timestamp
    of the event as well as the deviceid and the action.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704858

 src/core/display-private.h |    3 ++-
 src/core/display.c         |    7 ++++---
 src/core/keybindings.c     |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 0e8142c..86284fe 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -460,7 +460,8 @@ void meta_display_remove_autoraise_callback (MetaDisplay *display);
 void meta_display_overlay_key_activate (MetaDisplay *display);
 void meta_display_accelerator_activate (MetaDisplay *display,
                                         guint        action,
-                                        guint        deviceid);
+                                        guint        deviceid,
+                                        guint        timestamp);
 gboolean meta_display_modifiers_accelerator_activate (MetaDisplay *display);
 
 /* In above-tab-keycode.c */
diff --git a/src/core/display.c b/src/core/display.c
index ef07542..9d5a87c 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -254,7 +254,7 @@ meta_display_class_init (MetaDisplayClass *klass)
                   G_SIGNAL_RUN_LAST,
                   0,
                   NULL, NULL, NULL,
-                  G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
+                  G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
 
   /**
    * MetaDisplay::modifiers-accelerator-activated:
@@ -5892,10 +5892,11 @@ meta_display_overlay_key_activate (MetaDisplay *display)
 void
 meta_display_accelerator_activate (MetaDisplay *display,
                                    guint        action,
-                                   guint        deviceid)
+                                   guint        deviceid,
+                                   guint        timestamp)
 {
   g_signal_emit (display, display_signals[ACCELERATOR_ACTIVATED],
-                 0, action, deviceid);
+                 0, action, deviceid, timestamp);
 }
 
 gboolean
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 5455344..135dac5 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1312,7 +1312,7 @@ handle_external_grab (MetaDisplay    *display,
   guint action = meta_display_get_keybinding_action (display,
                                                      binding->keycode,
                                                      binding->mask);
-  meta_display_accelerator_activate (display, action, event->deviceid);
+  meta_display_accelerator_activate (display, action, event->deviceid, event->time);
 }
 
 


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