From 22112d2b4edced2de346d28cf6ee791cc805fe56 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 26 Jun 2003 16:32:40 +0000 Subject: [PATCH] check that extensions_vidmode is set before trying to use the vidmode functions --- openbox/client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index 08c22a75..e704237f 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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 } -- 2.39.2