]> git.sur5r.net Git - i3/i3/blobdiff - libi3/fake_configure_notify.c
Merge pull request #1816 from tcreech/tcreech-for-illumos
[i3/i3] / libi3 / fake_configure_notify.c
index 5f954cfa8e0c4314ff860be0db511243d2a3d301..2c4d4559848ffd23d10632ebea4219459117ef69 100644 (file)
@@ -2,10 +2,7 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- *
- * © 2009-2011 Michael Stapelberg and contributors
- *
- * See file LICENSE for license information.
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  */
 #include <stdlib.h>
@@ -26,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;
@@ -42,7 +39,7 @@ void fake_configure_notify(xcb_connection_t *conn, xcb_rectangle_t r, xcb_window
     generated_event->above_sibling = XCB_NONE;
     generated_event->override_redirect = false;
 
-    xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char*)generated_event);
+    xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char *)generated_event);
     xcb_flush(conn);
 
     free(event);