]> git.sur5r.net Git - i3/i3/commitdiff
Little cleanups
authorMichael Stapelberg <michael+x200@stapelberg.de>
Tue, 3 Mar 2009 01:05:35 +0000 (02:05 +0100)
committerMichael Stapelberg <michael+x200@stapelberg.de>
Tue, 3 Mar 2009 01:05:35 +0000 (02:05 +0100)
src/handlers.c
src/util.c

index ebedbccf2c772ec5bd1a0ddf562259e33ce15dc1..e644554bbcd921d61a8b9013471916d5bf807815 100644 (file)
@@ -331,7 +331,7 @@ int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_n
                 return 1;
         }
 
-        if (client->container->workspace->fullscreen_client == client) {
+        if (client->fullscreen) {
                 printf("client in fullscreen, not touching\n");
                 return 1;
         }
@@ -393,7 +393,7 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *c, xcb_unmap_notify_
                 }
 
                 /* If this was the fullscreen client, we need to unset it */
-                if (con->workspace->fullscreen_client == client)
+                if (client->fullscreen)
                         con->workspace->fullscreen_client = NULL;
 
                 /* If the container will be empty now and is in stacking mode, we need to
index 497474d6945dea0d254a7a4917447f616e103c28..995d3a54c3727bd8de518f9e884f9474242b9e6d 100644 (file)
@@ -274,13 +274,14 @@ void toggle_fullscreen(xcb_connection_t *conn, Client *client) {
                 values[0] = XCB_STACK_MODE_ABOVE;
                 xcb_configure_window(conn, client->frame, XCB_CONFIG_WINDOW_STACK_MODE, values);
 
-                xcb_flush(conn);
         } else {
                 printf("leaving fullscreen mode\n");
                 /* Because the coordinates of the window haven’t changed, it would not be
                    re-configured if we don’t set the following flag */
                 client->force_reconfigure = true;
-                /* We left fullscreen mode, redraw the layout */
-                render_layout(conn);
+                /* We left fullscreen mode, redraw the container */
+                render_container(conn, client->container);
         }
+
+        xcb_flush(conn);
 }