]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Reconfigure bar window when changing resolutions (Thanks Mirko) 3.a-bf2
authorMichael Stapelberg <michael+git@stapelberg.de>
Sun, 3 May 2009 20:59:50 +0000 (22:59 +0200)
committerMichael Stapelberg <michael+git@stapelberg.de>
Sun, 3 May 2009 20:59:50 +0000 (22:59 +0200)
src/xinerama.c
website/downloads/index.html

index 4926dfbde40b91490aebdb7ad5196f37260eb7e7..3a1b19a797265beb2959e192f57a848f35fd14f4 100644 (file)
@@ -163,6 +163,11 @@ static void query_screens(xcb_connection_t *conn, struct screens_head *screenlis
         }
 
         free(reply);
+
+        if (num_screens == 0) {
+                LOG("No screens found. This is weird.\n");
+                exit(1);
+        }
 }
 
 static void initialize_screen(xcb_connection_t *conn, i3Screen *screen, Workspace *workspace) {
@@ -232,6 +237,8 @@ void initialize_xinerama(xcb_connection_t *conn) {
  *
  */
 void xinerama_requery_screens(xcb_connection_t *conn) {
+        i3Font *font = load_font(conn, config.font);
+
         /* POSSIBLE PROBLEM: Is the order of the Xinerama screens always constant? That is, can
            it change when I move the --right-of video projector to --left-of? */
 
@@ -267,6 +274,16 @@ void xinerama_requery_screens(xcb_connection_t *conn) {
                                 screen->bar = workspaces[c].screen->bar;
                                 screen->bargc = workspaces[c].screen->bargc;
 
+                                Rect bar_rect = {screen->rect.x,
+                                                 screen->rect.height - (font->height + 6),
+                                                 screen->rect.x + screen->rect.width,
+                                                 font->height + 6};
+
+                                xcb_configure_window(conn, screen->bar, XCB_CONFIG_WINDOW_X |
+                                                                        XCB_CONFIG_WINDOW_Y |
+                                                                        XCB_CONFIG_WINDOW_WIDTH |
+                                                                        XCB_CONFIG_WINDOW_HEIGHT, &(bar_rect.x));
+
                                 /* Copy the list head for the dock clients */
                                 screen->dock_clients = workspaces[c].screen->dock_clients;
 
index 65c2872775e9dc61f21be56a20cca9215d584256..b7b0dab3ad0ebefafff6a5aa2996dad628b09932 100644 (file)
@@ -88,6 +88,11 @@ li {
 </p>
 
 <ul>
+  <li>
+    <a href="/downloads/i3-3.a-bf2.tar.bz2">i3-3.a-bf2.tar.bz2</a>
+    (<a href="/downloads/i3-3.a-bf2.tar.bz2.asc">GPG signature</a>), Version 3.α-bf2, 65 KiB, 2009-05-03,
+    hotfix for a problem with -bf1
+  </li>
   <li>
     <a href="/downloads/i3-3.a-bf1.tar.bz2">i3-3.a-bf1.tar.bz2</a>
     (<a href="/downloads/i3-3.a-bf1.tar.bz2.asc">GPG signature</a>), Version 3.α-bf1, 65 KiB, 2009-05-03,