From 98953ed6f19020770823b1dae271371627486656 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 19 Aug 2009 16:40:16 +0200 Subject: [PATCH] ewmh: fix bug with recent xcb-proto The len is the real len is byte, not the number of elements. Signed-off-by: Julien Danjou --- ewmh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ewmh.c b/ewmh.c index d0ff5e5c..e7f7ad52 100644 --- a/ewmh.c +++ b/ewmh.c @@ -538,7 +538,7 @@ ewmh_client_check_hints(client_t *c) if(reply && (data = xcb_get_property_value(reply))) { state = (xcb_atom_t *) data; - for(int i = 0; i < xcb_get_property_value_length(reply); i++) + for(int i = 0; i < xcb_get_property_value_length(reply) / ssizeof(xcb_atom_t); i++) ewmh_process_state_atom(c, state[i], _NET_WM_STATE_ADD); } @@ -548,7 +548,7 @@ ewmh_client_check_hints(client_t *c) if(reply && (data = xcb_get_property_value(reply))) { state = (xcb_atom_t *) data; - for(int i = 0; i < xcb_get_property_value_length(reply); i++) + for(int i = 0; i < xcb_get_property_value_length(reply) / ssizeof(xcb_atom_t); i++) if(state[i] == _NET_WM_WINDOW_TYPE_DESKTOP) c->type = MAX(c->type, WINDOW_TYPE_DESKTOP); else if(state[i] == _NET_WM_WINDOW_TYPE_DIALOG)