From d79578c91819da75579af6b99a9bd9d3bad1f060 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 8 Aug 2010 16:54:36 +0200 Subject: [PATCH] Remove some unused function arguments We no longer have to follow libxcb-property's API for these function, so we can remove arguments which we don't use anyway. Signed-off-by: Uli Schlachter --- property.c | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/property.c b/property.c index 4b912e1e..527d713d 100644 --- a/property.c +++ b/property.c @@ -53,9 +53,7 @@ p_delete(&reply); \ } \ static int \ - property_handle_##funcname(void *data, \ - xcb_connection_t *connection, \ - uint8_t state, \ + property_handle_##funcname(uint8_t state, \ xcb_window_t window, \ xcb_atom_t name, \ xcb_get_property_reply_t *reply) \ @@ -78,9 +76,7 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role) #define HANDLE_PROPERTY(name) \ static int \ - property_handle_##name(void *data, \ - xcb_connection_t *connection, \ - uint8_t state, \ + property_handle_##name(uint8_t state, \ xcb_window_t window, \ xcb_atom_t name, \ xcb_get_property_reply_t *reply) \ @@ -246,9 +242,7 @@ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply) } static int -property_handle_net_wm_strut_partial(void *data, - xcb_connection_t *connection, - uint8_t state, +property_handle_net_wm_strut_partial(uint8_t state, xcb_window_t window, xcb_atom_t name, xcb_get_property_reply_t *reply) @@ -342,17 +336,13 @@ property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply) } /** The property notify event handler. - * \param data currently unused. - * \param connection The connection to the X server. * \param state currently unused * \param window The window to obtain update the property with. * \param name The protocol atom, currently unused. * \param reply (Optional) An existing reply. */ static int -property_handle_xembed_info(void *data __attribute__ ((unused)), - xcb_connection_t *connection, - uint8_t state, +property_handle_xembed_info(uint8_t state, xcb_window_t window, xcb_atom_t name, xcb_get_property_reply_t *reply) @@ -360,15 +350,13 @@ property_handle_xembed_info(void *data __attribute__ ((unused)), xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window); if(emwin) - xembed_property_update(connection, emwin, reply); + xembed_property_update(globalconf.connection, emwin, reply); return 0; } static int -property_handle_xrootpmap_id(void *data __attribute__ ((unused)), - xcb_connection_t *connection, - uint8_t state, +property_handle_xrootpmap_id(uint8_t state, xcb_window_t window, xcb_atom_t name, xcb_get_property_reply_t *reply) @@ -378,7 +366,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)), (*w)->need_update = true; else { - int screen = xutil_root2screen(connection, window); + int screen = xutil_root2screen(globalconf.connection, window); foreach(w, globalconf.wiboxes) if(screen == screen_array_indexof(&globalconf.screens, (*w)->screen)) (*w)->need_update = true; @@ -388,9 +376,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)), } static int -property_handle_net_wm_opacity(void *data __attribute__ ((unused)), - xcb_connection_t *connection, - uint8_t state, +property_handle_net_wm_opacity(uint8_t state, xcb_window_t window, xcb_atom_t name, xcb_get_property_reply_t *reply) @@ -429,9 +415,7 @@ handle_propertynotify(void *data, xcb_property_notify_event_t *ev) { uint32_t length; - int (*handler)(void *data, - xcb_connection_t *connection, - uint8_t state, + int (*handler)(uint8_t state, xcb_window_t window, xcb_atom_t name, xcb_get_property_reply_t *reply) = NULL; @@ -490,7 +474,7 @@ handle_propertynotify(void *data, propr = xcb_get_property_reply(c, cookie, 0); } - int ret = (*handler)(NULL, c, ev->state, ev->window, ev->atom, propr); + int ret = (*handler)(ev->state, ev->window, ev->atom, propr); p_delete(&propr); return ret;