From 5431b18f335055c892783697c9cae2a0e029b9fa Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 25 Sep 2015 00:43:52 +0200 Subject: [PATCH] Rename client_maybevisible to client_on_selected_tags This makes it more clear what it is about, and also fixes its documentation. --- event.c | 2 +- objects/client.c | 8 +++----- objects/client.h | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/event.c b/event.c index d91f6e207..1246772d1 100644 --- a/event.c +++ b/event.c @@ -691,7 +691,7 @@ event_handle_maprequest(xcb_map_request_event_t *ev) else if((c = client_getbywin(ev->window))) { /* Check that it may be visible, but not asked to be hidden */ - if(client_maybevisible(c) && !c->hidden) + if(client_on_selected_tags(c) && !c->hidden) { lua_State *L = globalconf_get_lua_State(); luaA_object_push(L, c); diff --git a/objects/client.c b/objects/client.c index 32d009361..504425a72 100644 --- a/objects/client.c +++ b/objects/client.c @@ -236,14 +236,12 @@ client_set_class_instance(lua_State *L, int cidx, const char *class, const char luaA_object_emit_signal(L, cidx, "property::instance", 0); } -/** Returns true if a client is tagged - * with one of the tags of the specified screen. +/** Returns true if a client is tagged with one of the active tags. * \param c The client to check. - * \param screen Virtual screen. * \return true if the client is visible, false otherwise. */ bool -client_maybevisible(client_t *c) +client_on_selected_tags(client_t *c) { if(c->sticky) return true; @@ -441,7 +439,7 @@ client_focus_refresh(void) return; globalconf.focus.need_update = false; - if(c && client_maybevisible(c)) + if(c && client_on_selected_tags(c)) { /* Make sure this window is unbanned and e.g. not minimized */ client_unban(c); diff --git a/objects/client.h b/objects/client.h index e982cb86c..b30c6cf28 100644 --- a/objects/client.h +++ b/objects/client.h @@ -137,7 +137,7 @@ lua_class_t client_class; LUA_OBJECT_FUNCS(client_class, client_t, client) -bool client_maybevisible(client_t *); +bool client_on_selected_tags(client_t *); client_t * client_getbywin(xcb_window_t); client_t * client_getbyframewin(xcb_window_t); @@ -235,7 +235,7 @@ client_isfixed(client_t *c) static inline bool client_isvisible(client_t *c) { - return (!c->hidden && !c->minimized && client_maybevisible(c)); + return (!c->hidden && !c->minimized && client_on_selected_tags(c)); } #endif