summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2009-12-01 23:10:03 +0100
committerArnaud Fontaine <arfontaine@ITEM-58736.dhcp.oxfd.uk.sopra>2010-02-11 14:47:30 +0000
commit7e91bf4fe2f5e6ff68080303a0131ec5953eb626 (patch)
tree419648955543af7cb8f209f8c243872c3df84a9b
parentb7ea81eb322fc2d49d18b136ba448b03448b8527 (diff)
Get rid of unreadable shift in DO_REPLY_LIST_VALUES_ATOM
-rw-r--r--ewmh/ewmh.c.m415
1 files changed, 7 insertions, 8 deletions
diff --git a/ewmh/ewmh.c.m4 b/ewmh/ewmh.c.m4
index 6be2a6c..ab0593b 100644
--- a/ewmh/ewmh.c.m4
+++ b/ewmh/ewmh.c.m4
@@ -256,7 +256,7 @@ DO_REPLY_SINGLE_VALUE(cardinal, uint32_t, CARDINAL)
* component (such as coordinates), and divide by (r->format / 8)
* where r->format always equals to 32 in this case.
*/
-#define DO_REPLY_LIST_VALUES_ATOM(name, name_type, reply_type, len_shift) \
+#define DO_REPLY_LIST_VALUES_ATOM(name, name_type, reply_type) \
uint8_t \
xcb_ewmh_get_##name##_from_reply(xcb_ewmh_get_##name##_reply_t *data, \
xcb_get_property_reply_t *r) \
@@ -265,9 +265,8 @@ DO_REPLY_SINGLE_VALUE(cardinal, uint32_t, CARDINAL)
return 0; \
\
data->_reply = r; \
- data->name##_len = \
- GET_NB_FROM_LEN(xcb_get_property_value_length(data->_reply), \
- len_shift + 2); \
+ data->name##_len = xcb_get_property_value_length(data->_reply) / \
+ sizeof(name_type); \
\
data->name = (name_type *) xcb_get_property_value(data->_reply); \
return 1; \
@@ -545,8 +544,8 @@ xcb_ewmh_send_client_message(xcb_connection_t *c,
(char *) &ev);
}
-DO_REPLY_LIST_VALUES_ATOM(windows, xcb_window_t, WINDOW, 0)
-DO_REPLY_LIST_VALUES_ATOM(atoms, xcb_atom_t, ATOM, 0)
+DO_REPLY_LIST_VALUES_ATOM(windows, xcb_window_t, WINDOW)
+DO_REPLY_LIST_VALUES_ATOM(atoms, xcb_atom_t, ATOM)
/**
* Atoms initialisation
@@ -709,7 +708,7 @@ xcb_ewmh_get_desktop_geometry_reply(xcb_ewmh_connection_t *ewmh,
DO_ROOT_LIST_VALUES(_NET_DESKTOP_VIEWPORT, desktop_viewport, CARDINAL,
ewmh_coordinates, 1)
-DO_REPLY_LIST_VALUES_ATOM(desktop_viewport, xcb_ewmh_coordinates_t, CARDINAL, 1)
+DO_REPLY_LIST_VALUES_ATOM(desktop_viewport, xcb_ewmh_coordinates_t, CARDINAL)
xcb_void_cookie_t
xcb_ewmh_request_change_desktop_viewport(xcb_ewmh_connection_t *ewmh,
@@ -770,7 +769,7 @@ xcb_ewmh_request_change_active_window(xcb_ewmh_connection_t *ewmh,
*/
DO_ROOT_LIST_VALUES(_NET_WORKAREA, workarea, CARDINAL, ewmh_geometry, 2)
-DO_REPLY_LIST_VALUES_ATOM(workarea, xcb_ewmh_geometry_t, CARDINAL, 2)
+DO_REPLY_LIST_VALUES_ATOM(workarea, xcb_ewmh_geometry_t, CARDINAL)
/**
* _NET_SUPPORTING_WM_CHECK