[Xfce4-commits] r26262 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Tue Nov 6 23:52:31 CET 2007


Author: olivier
Date: 2007-11-06 22:52:31 +0000 (Tue, 06 Nov 2007)
New Revision: 26262

Modified:
   xfwm4/trunk/src/client.c
   xfwm4/trunk/src/display.c
   xfwm4/trunk/src/display.h
Log:
Get highest user time at initial client capture

Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c	2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/client.c	2007-11-06 22:52:31 UTC (rev 26262)
@@ -1586,7 +1586,7 @@
     if (getNetWMUserTime (display_info, c->window, &c->user_time) && (c->user_time != 0))
     {
         FLAG_SET (c->flags, CLIENT_FLAG_HAS_USER_TIME);
-        myDisplaySetLastUserTime (display_info, c->user_time);
+        myDisplayUpdateLastUserTime (display_info, c->user_time);
     }
 }
 

Modified: xfwm4/trunk/src/display.c
===================================================================
--- xfwm4/trunk/src/display.c	2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/display.c	2007-11-06 22:52:31 UTC (rev 26262)
@@ -753,6 +753,18 @@
     display->last_user_time = timestamp;
 }
 
+void
+myDisplayUpdateLastUserTime (DisplayInfo *display, Time timestamp)
+{
+    g_return_if_fail (display != NULL);
+    g_return_if_fail (timestamp != (Time) 0);
+
+    if (TIMESTAMP_IS_BEFORE(display->last_user_time, timestamp))
+    {
+	display->last_user_time = timestamp;
+    }
+}
+
 gboolean
 myDisplayTestXrender (DisplayInfo *display, gdouble min_time)
 {

Modified: xfwm4/trunk/src/display.h
===================================================================
--- xfwm4/trunk/src/display.h	2007-11-05 19:46:36 UTC (rev 26261)
+++ xfwm4/trunk/src/display.h	2007-11-06 22:52:31 UTC (rev 26262)
@@ -384,6 +384,8 @@
 Time                     myDisplayGetLastUserTime               (DisplayInfo *);
 void                     myDisplaySetLastUserTime               (DisplayInfo *,
                                                                  Time);
+void                     myDisplayUpdateLastUserTime            (DisplayInfo *, 
+                                                                 Time);
 gboolean                 myDisplayTestXrender                   (DisplayInfo *,
                                                                  gdouble);
 



More information about the Xfce4-commits mailing list