Merge pull request #475 from blueyed/rename-client_maybevisible
Rename client_maybevisible to client_on_selected_tags
This commit is contained in:
commit
81a2baba30
2
event.c
2
event.c
|
@ -691,7 +691,7 @@ event_handle_maprequest(xcb_map_request_event_t *ev)
|
||||||
else if((c = client_getbywin(ev->window)))
|
else if((c = client_getbywin(ev->window)))
|
||||||
{
|
{
|
||||||
/* Check that it may be visible, but not asked to be hidden */
|
/* 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();
|
lua_State *L = globalconf_get_lua_State();
|
||||||
luaA_object_push(L, c);
|
luaA_object_push(L, 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);
|
luaA_object_emit_signal(L, cidx, "property::instance", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns true if a client is tagged
|
/** Returns true if a client is tagged with one of the active tags.
|
||||||
* with one of the tags of the specified screen.
|
|
||||||
* \param c The client to check.
|
* \param c The client to check.
|
||||||
* \param screen Virtual screen.
|
|
||||||
* \return true if the client is visible, false otherwise.
|
* \return true if the client is visible, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
client_maybevisible(client_t *c)
|
client_on_selected_tags(client_t *c)
|
||||||
{
|
{
|
||||||
if(c->sticky)
|
if(c->sticky)
|
||||||
return true;
|
return true;
|
||||||
|
@ -441,7 +439,7 @@ client_focus_refresh(void)
|
||||||
return;
|
return;
|
||||||
globalconf.focus.need_update = false;
|
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 */
|
/* Make sure this window is unbanned and e.g. not minimized */
|
||||||
client_unban(c);
|
client_unban(c);
|
||||||
|
|
|
@ -137,7 +137,7 @@ lua_class_t client_class;
|
||||||
|
|
||||||
LUA_OBJECT_FUNCS(client_class, client_t, client)
|
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_getbywin(xcb_window_t);
|
||||||
client_t * client_getbyframewin(xcb_window_t);
|
client_t * client_getbyframewin(xcb_window_t);
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ client_isfixed(client_t *c)
|
||||||
static inline bool
|
static inline bool
|
||||||
client_isvisible(client_t *c)
|
client_isvisible(client_t *c)
|
||||||
{
|
{
|
||||||
return (!c->hidden && !c->minimized && client_maybevisible(c));
|
return (!c->hidden && !c->minimized && client_on_selected_tags(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue