Add warning if RandR initialization fails
Since currently the multimonitor extension support is a compile-time argument, there is not much we can do to recover from not being able to initialize RandR other than print an error and exit.
This commit is contained in:
parent
ce623af5ae
commit
56dfc25baf
@ -77,7 +77,10 @@ int randr_event_base = 0;
|
|||||||
void init_screens()
|
void init_screens()
|
||||||
{
|
{
|
||||||
int randr_error_base = 0;
|
int randr_error_base = 0;
|
||||||
XRRQueryExtension(xctx.dpy, &randr_event_base, &randr_error_base);
|
if (!XRRQueryExtension(xctx.dpy, &randr_event_base, &randr_error_base)) {
|
||||||
|
fprintf(stderr, "Dunst was compiled with RandR but RandR extension is missing.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
XRRSelectInput(xctx.dpy, RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)), RRScreenChangeNotifyMask);
|
XRRSelectInput(xctx.dpy, RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)), RRScreenChangeNotifyMask);
|
||||||
x_update_screens();
|
x_update_screens();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user