]> Dogcows Code - chaz/openbox/commitdiff
support serials wrapping around
authorDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 19:20:55 +0000 (19:20 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 19:20:55 +0000 (19:20 +0000)
openbox/event.c

index a75d7711032d6342234c7c02a59e917ea69adff0..9f1146a323bdff759e2c08d8bb4dc6ef442898a6 100644 (file)
@@ -1887,11 +1887,12 @@ static gboolean is_enter_focus_event_ignored(XEvent *e)
 
         /* XXX wraparound... */
         ob_debug("  ignore range %u-%u\n", r->start, r->end);
-        if (e->xany.serial > r->end) {
+        if ((glong)(e->xany.serial - r->end) > 0) {
+            /* past the end */
             ignore_serials = g_slist_delete_link(ignore_serials, it);
             g_free(r);
         }
-        else if (e->xany.serial >= r->start)
+        else if ((glong)(e->xany.serial - r->start) >= 0)
             return TRUE;
     }
     return FALSE;
This page took 0.022935 seconds and 4 git commands to generate.