]> git.sur5r.net Git - i3/i3/blobdiff - src/x.c
fix: to always abort we need to assert(false)
[i3/i3] / src / x.c
diff --git a/src/x.c b/src/x.c
index f73fc8463684f3d47fd1a48a3fe80e08b63dd6e7..f0a34d3bf466c3aba5aa803562207f23f8a57c23 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -48,7 +48,7 @@ static con_state *state_for_frame(xcb_window_t window) {
 
     /* TODO: better error handling? */
     ELOG("No state found\n");
-    assert(true);
+    assert(false);
     return NULL;
 }
 
@@ -239,11 +239,13 @@ static void x_push_node(Con *con) {
         state->mapped = con->mapped;
     }
 
+    bool fake_notify = false;
     /* set new position if rect changed */
     if (memcmp(&(state->rect), &(con->rect), sizeof(Rect)) != 0) {
         LOG("setting rect (%d, %d, %d, %d)\n", con->rect.x, con->rect.y, con->rect.width, con->rect.height);
         xcb_set_window_rect(conn, con->frame, con->rect);
         memcpy(&(state->rect), &(con->rect), sizeof(Rect));
+        fake_notify = true;
     }
 
     /* dito, but for child windows */
@@ -252,6 +254,12 @@ static void x_push_node(Con *con) {
             con->window_rect.x, con->window_rect.y, con->window_rect.width, con->window_rect.height);
         xcb_set_window_rect(conn, con->window->id, con->window_rect);
         memcpy(&(state->rect), &(con->rect), sizeof(Rect));
+        fake_notify = true;
+    }
+
+    if (fake_notify) {
+        LOG("Sending fake configure notify\n");
+        fake_absolute_configure_notify(con);
     }
 
     /* handle all children and floating windows of this node */