]> Dogcows Code - chaz/openbox/commitdiff
check that extensions_vidmode is set before trying to use the vidmode functions
authorDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 16:32:40 +0000 (16:32 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 26 Jun 2003 16:32:40 +0000 (16:32 +0000)
openbox/client.c

index 08c22a75082c4da5209986f5b4062b96b39e0cf4..e704237f55d07207fbf2b3a60a80b889f4d0e47f 100644 (file)
@@ -1621,7 +1621,8 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
         int dot;
         XF86VidModeModeLine mode;
 
-        if (XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode)) {
+        if (extensions_vidmode &&
+            XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode)) {
             w = mode.hdisplay;
             h = mode.vdisplay;
             if (mode.privsize) XFree(mode.private);
@@ -1632,7 +1633,8 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
 #endif
 #ifdef VIDMODE
         }
-        if (!XF86VidModeGetViewPort(ob_display, ob_screen, &x, &y)) {
+        if (!(extensions_vidmode &&
+              XF86VidModeGetViewPort(ob_display, ob_screen, &x, &y))) {
             x = y = 0;
 #endif
         }
This page took 0.02767 seconds and 4 git commands to generate.