]> git.sur5r.net Git - i3/i3/blobdiff - libi3/fake_configure_notify.c
Use open_floating_window arguments for rect
[i3/i3] / libi3 / fake_configure_notify.c
index 225577a44017157d001323b29d9fb77b0329f535..145f4512248b7170c98d5a7ec450dcf29e6c4bd6 100644 (file)
@@ -5,14 +5,14 @@
  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  */
+#include "libi3.h"
+
 #include <stdlib.h>
 #include <stdbool.h>
 
 #include <xcb/xcb.h>
 #include <xcb/xproto.h>
 
-#include "libi3.h"
-
 /*
  * Generates a configure_notify event and sends it to the given window
  * Applications need this to think they’ve configured themselves correctly.
@@ -23,7 +23,7 @@ void fake_configure_notify(xcb_connection_t *conn, xcb_rectangle_t r, xcb_window
     /* Every X11 event is 32 bytes long. Therefore, XCB will copy 32 bytes.
      * In order to properly initialize these bytes, we allocate 32 bytes even
      * though we only need less for an xcb_configure_notify_event_t */
-    void *event = scalloc(32);
+    void *event = scalloc(32, 1);
     xcb_configure_notify_event_t *generated_event = event;
 
     generated_event->event = window;