]> git.sur5r.net Git - i3/i3/blobdiff - src/xcb.c
Implement horizontal resize
[i3/i3] / src / xcb.c
index 3f5d42800254679b6cb07e36ea1f8211aa36a4ec..a2f813b06898ff2932d93baf7a04c6257273988f 100644 (file)
--- a/src/xcb.c
+++ b/src/xcb.c
@@ -181,8 +181,6 @@ void fake_configure_notify(xcb_connection_t *conn, Rect r, xcb_window_t window)
 
         xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char*)&generated_event);
         xcb_flush(conn);
-
-        LOG("Told the client it is at %dx%d with %dx%d\n", r.x, r.y, r.width, r.height);
 }
 
 /*
@@ -195,8 +193,8 @@ void fake_absolute_configure_notify(xcb_connection_t *conn, Client *client) {
 
         absolute.x = client->rect.x + client->child_rect.x;
         absolute.y = client->rect.y + client->child_rect.y;
-        absolute.width = client->rect.width - (2 * client->child_rect.x);
-        absolute.height = client->rect.height - client->child_rect.y - 1;
+        absolute.width = client->child_rect.width;
+        absolute.height = client->child_rect.height;
 
         fake_configure_notify(conn, absolute, client->child);
 }
@@ -239,6 +237,8 @@ void xcb_get_numlock_mask(xcb_connection_t *conn) {
 #else
         /* For now, we only use the first keysymbol. */
         xcb_keycode_t *numlock_syms = xcb_key_symbols_get_keycode(keysyms, XCB_NUM_LOCK);
+        if (numlock_syms == NULL)
+                return;
         xcb_keycode_t numlock = *numlock_syms;
         free(numlock_syms);
 #endif