]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Initialize screens correctly when not using Xinerama (Thanks Mikael)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 5 Sep 2009 17:17:59 +0000 (19:17 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 5 Sep 2009 17:20:01 +0000 (19:20 +0200)
src/xinerama.c

index 59e7e225aae8696cba1f6d4103a8d3e455126461..f40ec84b342fe7b248e3adcbdb50affe9fb277a8 100644 (file)
@@ -246,19 +246,18 @@ void initialize_xinerama(xcb_connection_t *conn) {
         if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
                 LOG("Xinerama extension not found, disabling.\n");
                 disable_xinerama(conn);
-                return;
-        }
+        } else {
+                xcb_xinerama_is_active_reply_t *reply;
+                reply = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL);
 
-        xcb_xinerama_is_active_reply_t *reply;
-        reply = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL);
+                if (reply == NULL || !reply->state) {
+                        LOG("Xinerama is not active (in your X-Server), disabling.\n");
+                        disable_xinerama(conn);
+                } else
+                        query_screens(conn, virtual_screens);
 
-        if (reply == NULL || !reply->state) {
-                LOG("Xinerama is not active (in your X-Server), disabling.\n");
-                disable_xinerama(conn);
-        } else
-                query_screens(conn, virtual_screens);
-
-        FREE(reply);
+                FREE(reply);
+        }
 
         i3Screen *screen;
         num_screens = 0;