]> Dogcows Code - chaz/openbox/blobdiff - openbox/client.c
use CurrentTime constant
[chaz/openbox] / openbox / client.c
index a51ecfd7c7ed54ce2ba0e094d394b9969cb6f885..3e069464218c5ba1bfcb7b724b753bcc322dfff0 100644 (file)
@@ -414,8 +414,11 @@ void client_manage(Window window)
         else
         {
             /* If time stamp is old, don't steal focus */
-            if (self->user_time && self->user_time < client_last_user_time)
+            if (self->user_time &&
+                !event_time_after(self->user_time, client_last_user_time))
+            {
                 activate = FALSE;
+            }
             /* Don't steal focus from globally active clients.
                I stole this idea from KWin. It seems nice.
              */
@@ -2960,11 +2963,6 @@ gboolean client_focus(ObClient *self)
     /* choose the correct target */
     self = client_focus_target(self);
 
-#if 0
-    if (!client_validate(self))
-        return FALSE;
-#endif
-
     if (!client_can_focus(self)) {
         if (!self->frame->visible) {
             /* update the focus lists */
@@ -3031,9 +3029,11 @@ void client_activate(ObClient *self, gboolean here, gboolean user)
              "source=%s\n",
              self->window, event_curtime, client_last_user_time,
              (user ? "user" : "application"));
-    if (!user && event_curtime && event_curtime < client_last_user_time)
+    if (!user && event_curtime &&
+        !event_time_after(event_curtime, client_last_user_time))
+    {
         client_hilite(self, TRUE);
-    else {
+    else {
         if (client_normal(self) && screen_showing_desktop)
             screen_show_desktop(FALSE);
         if (self->iconic)
This page took 0.021704 seconds and 4 git commands to generate.