diff --git a/objects/selection_getter.c b/objects/selection_getter.c index 9b8f4160e..72fe1e2fc 100644 --- a/objects/selection_getter.c +++ b/objects/selection_getter.c @@ -202,16 +202,16 @@ selection_getter_find_by_window(lua_State *L, xcb_window_t window) return 0; } -int +void property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window) { lua_State *L = globalconf_get_lua_State(); if (state != XCB_PROPERTY_NEW_VALUE) - return 0; + return; if (selection_getter_find_by_window(L, window) == 0) - return 0; + return; selection_getter_t *selection = lua_touserdata(L, -1); @@ -236,7 +236,6 @@ property_handle_awesome_selection_atom(uint8_t state, xcb_window_t window) } lua_pop(L, 1); - return 0; } void diff --git a/objects/selection_getter.h b/objects/selection_getter.h index aa676be71..53eeb973f 100644 --- a/objects/selection_getter.h +++ b/objects/selection_getter.h @@ -27,7 +27,7 @@ void selection_getter_class_setup(lua_State*); void event_handle_selectionnotify(xcb_selection_notify_event_t*); -int property_handle_awesome_selection_atom(uint8_t, xcb_window_t); +void property_handle_awesome_selection_atom(uint8_t, xcb_window_t); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/property.c b/property.c index f84a6b529..30fd44fd7 100644 --- a/property.c +++ b/property.c @@ -53,14 +53,13 @@ lua_pop(L, 1); \ p_delete(&reply); \ } \ - static int \ + static void \ property_handle_##funcname(uint8_t state, \ xcb_window_t window) \ { \ client_t *c = client_getbywin(window); \ if(c) \ property_update_##funcname(c, property_get_##funcname(c));\ - return 0; \ } @@ -74,14 +73,13 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role) #undef HANDLE_TEXT_PROPERTY #define HANDLE_PROPERTY(name) \ - static int \ + static void \ property_handle_##name(uint8_t state, \ xcb_window_t window) \ { \ client_t *c = client_getbywin(window); \ if(c) \ property_update_##name(c, property_get_##name(c));\ - return 0; \ } HANDLE_PROPERTY(wm_protocols) @@ -251,7 +249,7 @@ property_update_wm_class(client_t *c, xcb_get_property_cookie_t cookie) xcb_icccm_get_wm_class_reply_wipe(&hint); } -static int +static void property_handle_net_wm_strut_partial(uint8_t state, xcb_window_t window) { @@ -259,8 +257,6 @@ property_handle_net_wm_strut_partial(uint8_t state, if(c) ewmh_process_client_strut(c); - - return 0; } xcb_get_property_cookie_t @@ -375,7 +371,7 @@ property_update_wm_protocols(client_t *c, xcb_get_property_cookie_t cookie) * \param state currently unused * \param window The window to obtain update the property with. */ -static int +static void property_handle_xembed_info(uint8_t state, xcb_window_t window) { @@ -392,11 +388,9 @@ property_handle_xembed_info(uint8_t state, globalconf.timestamp, propr); p_delete(&propr); } - - return 0; } -static int +static void property_handle_net_wm_opacity(uint8_t state, xcb_window_t window) { @@ -419,18 +413,15 @@ property_handle_net_wm_opacity(uint8_t state, lua_pop(L, 1); } } - - return 0; } -static int +static void property_handle_xrootpmap_id(uint8_t state, xcb_window_t window) { lua_State *L = globalconf_get_lua_State(); root_update_wallpaper(); signal_object_emit(L, &global_signals, "wallpaper_changed", 0); - return 0; } /** The property notify event handler handling xproperties. @@ -481,7 +472,7 @@ property_handle_propertynotify_xproperty(xcb_property_notify_event_t *ev) void property_handle_propertynotify(xcb_property_notify_event_t *ev) { - int (*handler)(uint8_t state, + void (*handler)(uint8_t state, xcb_window_t window) = NULL; globalconf.timestamp = ev->time;