[mutter/wip/wayland-clutter-events-2: 15/19] display: Move set_user_time updating code to Clutter event callback



commit 04857efe234482e4c0c0e15801a0634555eb06dd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Oct 3 23:29:53 2013 -0400

    display: Move set_user_time updating code to Clutter event callback

 src/core/display.c |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index c275f48..d53c8f1 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2233,6 +2233,26 @@ meta_display_handle_event (MetaDisplay        *display,
 
   display->current_time = event->any.time;
 
+  if (window && !window->override_redirect &&
+      (event->type == CLUTTER_KEY_PRESS || event->type == CLUTTER_BUTTON_PRESS))
+    {
+      if (CurrentTime == display->current_time)
+        {
+          /* We can't use missing (i.e. invalid) timestamps to set user time,
+           * nor do we want to use them to sanity check other timestamps.
+           * See bug 313490 for more details.
+           */
+          meta_warning ("Event has no timestamp! You may be using a broken "
+                        "program such as xse.  Please ask the authors of that "
+                        "program to fix it.\n");
+        }
+      else
+        {
+          meta_window_set_user_time (window, display->current_time);
+          sanity_check_timestamps (display, display->current_time);
+        }
+    }
+
   switch (event->type)
     {
     case CLUTTER_BUTTON_PRESS:
@@ -2474,26 +2494,6 @@ handle_input_xevent (MetaDisplay *display,
   modified = xievent_get_modified_window (display, input_event);
   window = modified != None ? meta_display_lookup_x_window (display, modified) : NULL;
 
-  if (window && !window->override_redirect &&
-      ((input_event->type == XI_KeyPress) || (input_event->type == XI_ButtonPress)))
-    {
-      if (CurrentTime == display->current_time)
-        {
-          /* We can't use missing (i.e. invalid) timestamps to set user time,
-           * nor do we want to use them to sanity check other timestamps.
-           * See bug 313490 for more details.
-           */
-          meta_warning ("Event has no timestamp! You may be using a broken "
-                        "program such as xse.  Please ask the authors of that "
-                        "program to fix it.\n");
-        }
-      else
-        {
-          meta_window_set_user_time (window, display->current_time);
-          sanity_check_timestamps (display, display->current_time);
-        }
-    }
-
   switch (input_event->evtype)
     {
     case XI_Enter:


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