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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-08 16:54:36 +02:00
parent b64c989963
commit 0262e39609
1 changed files with 10 additions and 26 deletions

View File

@ -53,9 +53,7 @@
p_delete(&reply); \ p_delete(&reply); \
} \ } \
static int \ static int \
property_handle_##funcname(void *data, \ property_handle_##funcname(uint8_t state, \
xcb_connection_t *connection, \
uint8_t state, \
xcb_window_t window, \ xcb_window_t window, \
xcb_atom_t name, \ xcb_atom_t name, \
xcb_get_property_reply_t *reply) \ 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) \ #define HANDLE_PROPERTY(name) \
static int \ static int \
property_handle_##name(void *data, \ property_handle_##name(uint8_t state, \
xcb_connection_t *connection, \
uint8_t state, \
xcb_window_t window, \ xcb_window_t window, \
xcb_atom_t name, \ xcb_atom_t name, \
xcb_get_property_reply_t *reply) \ xcb_get_property_reply_t *reply) \
@ -243,9 +239,7 @@ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
} }
static int static int
property_handle_net_wm_strut_partial(void *data, property_handle_net_wm_strut_partial(uint8_t state,
xcb_connection_t *connection,
uint8_t state,
xcb_window_t window, xcb_window_t window,
xcb_atom_t name, xcb_atom_t name,
xcb_get_property_reply_t *reply) xcb_get_property_reply_t *reply)
@ -339,17 +333,13 @@ property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply)
} }
/** The property notify event handler. /** The property notify event handler.
* \param data currently unused.
* \param connection The connection to the X server.
* \param state currently unused * \param state currently unused
* \param window The window to obtain update the property with. * \param window The window to obtain update the property with.
* \param name The protocol atom, currently unused. * \param name The protocol atom, currently unused.
* \param reply (Optional) An existing reply. * \param reply (Optional) An existing reply.
*/ */
static int static int
property_handle_xembed_info(void *data __attribute__ ((unused)), property_handle_xembed_info(uint8_t state,
xcb_connection_t *connection,
uint8_t state,
xcb_window_t window, xcb_window_t window,
xcb_atom_t name, xcb_atom_t name,
xcb_get_property_reply_t *reply) xcb_get_property_reply_t *reply)
@ -357,15 +347,13 @@ property_handle_xembed_info(void *data __attribute__ ((unused)),
xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window); xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window);
if(emwin) if(emwin)
xembed_property_update(connection, emwin, reply); xembed_property_update(globalconf.connection, emwin, reply);
return 0; return 0;
} }
static int static int
property_handle_xrootpmap_id(void *data __attribute__ ((unused)), property_handle_xrootpmap_id(uint8_t state,
xcb_connection_t *connection,
uint8_t state,
xcb_window_t window, xcb_window_t window,
xcb_atom_t name, xcb_atom_t name,
xcb_get_property_reply_t *reply) xcb_get_property_reply_t *reply)
@ -375,7 +363,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)),
(*w)->need_update = true; (*w)->need_update = true;
else else
{ {
int screen = xutil_root2screen(connection, window); int screen = xutil_root2screen(globalconf.connection, window);
foreach(w, globalconf.wiboxes) foreach(w, globalconf.wiboxes)
if(screen == screen_array_indexof(&globalconf.screens, (*w)->screen)) if(screen == screen_array_indexof(&globalconf.screens, (*w)->screen))
(*w)->need_update = true; (*w)->need_update = true;
@ -385,9 +373,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)),
} }
static int static int
property_handle_net_wm_opacity(void *data __attribute__ ((unused)), property_handle_net_wm_opacity(uint8_t state,
xcb_connection_t *connection,
uint8_t state,
xcb_window_t window, xcb_window_t window,
xcb_atom_t name, xcb_atom_t name,
xcb_get_property_reply_t *reply) xcb_get_property_reply_t *reply)
@ -426,9 +412,7 @@ handle_propertynotify(void *data,
xcb_property_notify_event_t *ev) xcb_property_notify_event_t *ev)
{ {
uint32_t length; uint32_t length;
int (*handler)(void *data, int (*handler)(uint8_t state,
xcb_connection_t *connection,
uint8_t state,
xcb_window_t window, xcb_window_t window,
xcb_atom_t name, xcb_atom_t name,
xcb_get_property_reply_t *reply) = NULL; xcb_get_property_reply_t *reply) = NULL;
@ -487,7 +471,7 @@ handle_propertynotify(void *data,
propr = xcb_get_property_reply(c, cookie, 0); 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); p_delete(&propr);
return ret; return ret;