]> git.sur5r.net Git - i3/i3/blobdiff - src/randr.c
Check if output is disabled in handle_output()
[i3/i3] / src / randr.c
index a4a0f6fd6d36fe7c626d836e7bc23d8c34573cdb..9549c9d5f032bb1bffc7425016b4c7ced0b58945 100644 (file)
@@ -555,6 +555,12 @@ static void handle_output(xcb_connection_t *conn, xcb_randr_output_t id,
         return;
     }
 
+    if (output->connection == XCB_RANDR_CONNECTION_DISCONNECTED) {
+        DLOG("Disabling output %s: it is disconnected\n", new->name);
+        new->to_be_disabled = true;
+        return;
+    }
+
     bool updated = update_if_necessary(&(new->rect.x), crtc->x) |
                    update_if_necessary(&(new->rect.y), crtc->y) |
                    update_if_necessary(&(new->rect.width), crtc->width) |