Merge pull request #475 from blueyed/rename-client_maybevisible

Rename client_maybevisible to client_on_selected_tags
This commit is contained in:
Daniel Hahler 2015-09-25 10:15:00 +02:00
commit 81a2baba30
3 changed files with 6 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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