]> Pileus Git - ~andy/gtk/commitdiff
Don't move global user time backwards
authorAlexander Larsson <alexl@redhat.com>
Tue, 7 Apr 2009 13:37:40 +0000 (15:37 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 7 Apr 2009 13:37:40 +0000 (15:37 +0200)
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

index a6d88b9ffc8691097dd2e9075a2081dfeb7b7764..54810a8c86056ba86738c1c0d962fcd3e001ab0d 100644 (file)
@@ -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)