X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fextensions.c;h=5b64bc64613299251178bb32fd07f376ef40f18c;hb=ad852b6b56e43bdd7dda1389f54051cf92c0fad9;hp=32ad00123302508370daa732bf0125c89dfb35b2;hpb=0ed1b678d18b07cfb5def76e0e5f7f14bc12e95c;p=chaz%2Fopenbox diff --git a/openbox/extensions.c b/openbox/extensions.c index 32ad0012..5b64bc64 100644 --- a/openbox/extensions.c +++ b/openbox/extensions.c @@ -2,7 +2,7 @@ extensions.c for the Openbox window manager Copyright (c) 2006 Mikael Magnusson - Copyright (c) 2003 Ben Jansens + Copyright (c) 2003-2007 Dana Jansens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #include "geom.h" #include "extensions.h" #include "screen.h" +#include "debug.h" gboolean extensions_xkb = FALSE; gint extensions_xkb_event_basep; @@ -30,6 +31,8 @@ gboolean extensions_xinerama = FALSE; gint extensions_xinerama_event_basep; gboolean extensions_randr = FALSE; gint extensions_randr_event_basep; +gboolean extensions_sync = FALSE; +gint extensions_sync_event_basep; void extensions_query_all() { @@ -59,6 +62,16 @@ void extensions_query_all() XRRQueryExtension(ob_display, &extensions_randr_event_basep, &junk); #endif + +#ifdef SYNC + extensions_sync = + XSyncQueryExtension(ob_display, &extensions_sync_event_basep, + &junk) && + XSyncInitialize(ob_display, &junk, &junk); + if (!extensions_sync) + ob_debug("X Sync extension is not present on the server or is an " + "incompatible version"); +#endif } void extensions_xinerama_screens(Rect **xin_areas, guint *nxin)