diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-06-04 23:21:51 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-06-04 23:21:51 +0000 |
| commit | f7de8e5a59a4b0b2b92f9b88f0abd0db094b0fe5 (patch) | |
| tree | 525268b1c10effed16b115732da6d8b301fc4c04 /openbox/client.c | |
| parent | abd8ec3c2e022d271b69672630caa07a72a07a93 (diff) | |
better VIDMODE support, handle the cases where the functions fail
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/openbox/client.c b/openbox/client.c index 45026384..f704ca1a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1613,17 +1613,21 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h, int dot; XF86VidModeModeLine mode; - XF86VidModeGetViewPort(ob_display, ob_screen, &x, &y); - XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode); - w = mode.hdisplay; - h = mode.vdisplay; - if (mode.privsize) XFree(mode.private); + if (XF86VidModeGetModeLine(ob_display, ob_screen, &dot, &mode)) { + w = mode.hdisplay; + h = mode.vdisplay; + if (mode.privsize) XFree(mode.private); + } else { #else - x = 0; - y = 0; - w = screen_physical_size.width; - h = screen_physical_size.height; + w = screen_physical_size.width; + h = screen_physical_size.height; #endif +#ifdef VIDMODE + } + if (!XF86VidModeGetViewPort(ob_display, ob_screen, &x, &y)) { + x = y = 0; +#endif + } user = FALSE; /* ignore that increment etc shit when in fullscreen */ } else { /* set the size and position if maximized */ |
