diff --git a/objects/screen.c b/objects/screen.c index c07ae4a8..09ba56bc 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -445,6 +445,16 @@ screen_scan_randr(lua_State *L, screen_array_t *screens) screen_scan_randr_monitors(L, screens); else screen_scan_randr_crtcs(L, screens); + + if (screens->len == 0) + { + /* Scanning failed, disable randr again */ + xcb_randr_select_input(globalconf.connection, + globalconf.screen->root, + 0); + globalconf.have_randr_13 = false; + globalconf.have_randr_15 = false; + } } static void @@ -588,7 +598,7 @@ screen_modified(screen_t *existing_screen, screen_t *other_screen) void screen_refresh(void) { - if(!globalconf.screen_need_refresh) + if(!globalconf.screen_need_refresh || !globalconf.have_randr_13) return; globalconf.screen_need_refresh = false;