diff options
Diffstat (limited to 'src/xrandr.c')
-rw-r--r-- | src/xrandr.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/xrandr.c b/src/xrandr.c index 365602d..c369dbc 100644 --- a/src/xrandr.c +++ b/src/xrandr.c @@ -21,6 +21,8 @@ #include "ratpoison.h" +#ifdef HAVE_XRANDR + #include <X11/extensions/Xrandr.h> static int xrandr_evbase; @@ -262,3 +264,47 @@ xrandr_notify (XEvent *ev) break; } } + +#else /* HAVE_XRANDR */ + +void +init_xrandr(void) +{ + /* Nothing */ +} + +int +xrandr_query_screen (int **outputs) +{ + (void)outputs; + fatal("xrandr_query_screen shouldn't be called. This is a BUG."); + return 0; +} + +int +xrandr_is_primary (rp_screen *screen) +{ + (void)screen; + fatal("xrandr_is_primary shouldn't be called. This is a BUG."); + return 0; +} + +void +xrandr_fill_screen (int rr_output, rp_screen *screen) +{ + (void)rr_output; + memset(&screen->xrandr, 0, sizeof(screen->xrandr)); + screen->xrandr.primary = (rr_output == 0); + screen->xrandr.output = rr_output; + screen->xrandr.name = sbuf_new (0); + sbuf_concat (screen->xrandr.name, "N/A"); +} + +void +xrandr_notify (XEvent *ev) +{ + (void)ev; + fatal("xrandr_notify shouldn't be called. This is a BUG."); +} + +#endif /* HAVE_XRANDR */ |