diff --git a/event.c b/event.c index d91f6e20..1246772d 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 32d00936..504425a7 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 e982cb86..b30c6cf2 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