Remove another argument to property handlers

Since each handler is only for one single atom, there is no point in passing the
atom that was changed to the callback.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-09 13:06:32 +02:00
parent 709619b466
commit a89ca515f5
1 changed files with 8 additions and 15 deletions

View File

@ -55,8 +55,7 @@
} \ } \
static int \ static int \
property_handle_##funcname(uint8_t state, \ property_handle_##funcname(uint8_t state, \
xcb_window_t window, \ xcb_window_t window) \
xcb_atom_t name) \
{ \ { \
client_t *c = client_getbywin(window); \ client_t *c = client_getbywin(window); \
if(c) \ if(c) \
@ -77,8 +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(uint8_t state, \ property_handle_##name(uint8_t state, \
xcb_window_t window, \ xcb_window_t window) \
xcb_atom_t name) \
{ \ { \
client_t *c = client_getbywin(window); \ client_t *c = client_getbywin(window); \
if(c) \ if(c) \
@ -224,8 +222,7 @@ property_update_wm_class(client_t *c, xcb_get_property_cookie_t cookie)
static int static int
property_handle_net_wm_strut_partial(uint8_t state, property_handle_net_wm_strut_partial(uint8_t state,
xcb_window_t window, xcb_window_t window)
xcb_atom_t name)
{ {
client_t *c = client_getbywin(window); client_t *c = client_getbywin(window);
@ -313,8 +310,7 @@ property_update_wm_protocols(client_t *c, xcb_get_property_cookie_t cookie)
*/ */
static int static int
property_handle_xembed_info(uint8_t state, property_handle_xembed_info(uint8_t state,
xcb_window_t window, xcb_window_t window)
xcb_atom_t name)
{ {
xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window); xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window);
@ -334,8 +330,7 @@ property_handle_xembed_info(uint8_t state,
static int static int
property_handle_xrootpmap_id(uint8_t state, property_handle_xrootpmap_id(uint8_t state,
xcb_window_t window, xcb_window_t window)
xcb_atom_t name)
{ {
if(globalconf.xinerama_is_active) if(globalconf.xinerama_is_active)
foreach(w, globalconf.wiboxes) foreach(w, globalconf.wiboxes)
@ -353,8 +348,7 @@ property_handle_xrootpmap_id(uint8_t state,
static int static int
property_handle_net_wm_opacity(uint8_t state, property_handle_net_wm_opacity(uint8_t state,
xcb_window_t window, xcb_window_t window)
xcb_atom_t name)
{ {
wibox_t *wibox = wibox_getbywin(window); wibox_t *wibox = wibox_getbywin(window);
@ -388,8 +382,7 @@ void
property_handle_propertynotify(xcb_property_notify_event_t *ev) property_handle_propertynotify(xcb_property_notify_event_t *ev)
{ {
int (*handler)(uint8_t state, int (*handler)(uint8_t state,
xcb_window_t window, xcb_window_t window) = NULL;
xcb_atom_t name) = NULL;
/* Find the correct event handler */ /* Find the correct event handler */
#define HANDLE(atom_, cb) \ #define HANDLE(atom_, cb) \
@ -431,7 +424,7 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev)
#undef HANDLE #undef HANDLE
#undef END #undef END
(*handler)(ev->state, ev->window, ev->atom); (*handler)(ev->state, ev->window);
} }
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80