[gtk+: 2/4] Don't move global user time backwards



commit 87459ff86c88469a752a09314db44526264de2f2
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Apr 7 15:37:40 2009 +0200

    Don't move global user time backwards
    
    When setting the user_time on a specific app to something, make sure
    we're not moving the global per-display user time backwards.
---
 gdk/x11/gdkwindow-x11.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index a6d88b9..54810a8 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3995,7 +3995,9 @@ gdk_x11_window_set_user_time (GdkWindow *window,
                    XA_CARDINAL, 32, PropModeReplace,
                    (guchar *)&timestamp_long, 1);
 
-  if (timestamp_long != GDK_CURRENT_TIME)
+  if (timestamp_long != GDK_CURRENT_TIME &&
+      (display_x11->user_time == GDK_CURRENT_TIME ||
+       XSERVER_TIME_IS_LATER (timestamp_long, display_x11->user_time)))
     display_x11->user_time = timestamp_long;
 
   if (toplevel)



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