From 66e8b40be1c093f2ec20c25a89cff8e2d86fd01c Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 20 Feb 2014 20:38:50 +0000 Subject: [PATCH] Don't enumerate disconnected outputs --- bar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bar.c b/bar.c index 7470277..c2c84d0 100644 --- a/bar.c +++ b/bar.c @@ -470,7 +470,7 @@ get_randr_monitors (void) oi_reply = xcb_randr_get_output_info_reply(c, xcb_randr_get_output_info(c, outputs[i], XCB_CURRENT_TIME), NULL); /* Output disconnected or not attached to any CRTC ? */ - if (!oi_reply || oi_reply->crtc == XCB_NONE) { + if (!oi_reply || oi_reply->crtc == XCB_NONE || oi_reply->connection != XCB_RANDR_CONNECTION_CONNECTED) { rects[i].width = 0; continue; }