Initialize size hints struct on manage
Patch status: needinfo
Patch by Tony Crisci
Long description:
Since the declaration of wm_size_hints in manage_window is local, it may initially contain garbage values. Since this variable is later used in a conditional, it must be zeroed to be reliable.
To apply this patch, use:
curl http://cr.i3wm.org/patch/456/raw.patch | git am
b/src/manage.c
16 |
@@ -198,6 +198,7 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki |
17 |
border_style_t motif_border_style = BS_NORMAL; |
18 |
window_update_motif_hints(cwindow, xcb_get_property_reply(conn, motif_wm_hints_cookie, NULL), &motif_border_style); |
19 |
xcb_size_hints_t wm_size_hints; |
20 |
+ memset(&wm_size_hints, 0, sizeof(xcb_size_hints_t)); |
21 |
xcb_icccm_get_wm_size_hints_reply(conn, wm_normal_hints_cookie, &wm_size_hints, NULL); |
22 |
xcb_get_property_reply_t *type_reply = xcb_get_property_reply(conn, wm_type_cookie, NULL); |
23 |
xcb_get_property_reply_t *state_reply = xcb_get_property_reply(conn, state_cookie, NULL); |