client: inline isvisible()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
c66e28c7d9
commit
126e2dc0ec
12
client.c
12
client.c
|
@ -159,18 +159,6 @@ client_maybevisible(client_t *c, int screen)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns true if a client is tagged
|
|
||||||
* with one of the tags of the specified screen and is not hidden.
|
|
||||||
* \param c The client to check.
|
|
||||||
* \param screen Virtual screen number.
|
|
||||||
* \return true if the client is visible, false otherwise.
|
|
||||||
*/
|
|
||||||
bool
|
|
||||||
client_isvisible(client_t *c, int screen)
|
|
||||||
{
|
|
||||||
return (!c->ishidden && client_maybevisible(c, screen));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Get a client by its window.
|
/** Get a client by its window.
|
||||||
* \param w The client window to find.
|
* \param w The client window to find.
|
||||||
* \return A client pointer if found, NULL otherwise.
|
* \return A client pointer if found, NULL otherwise.
|
||||||
|
|
13
client.h
13
client.h
|
@ -35,7 +35,6 @@
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
bool client_maybevisible(client_t *, int);
|
bool client_maybevisible(client_t *, int);
|
||||||
bool client_isvisible(client_t *, int);
|
|
||||||
client_t * client_getbywin(xcb_window_t);
|
client_t * client_getbywin(xcb_window_t);
|
||||||
void client_stack(void);
|
void client_stack(void);
|
||||||
void client_ban(client_t *);
|
void client_ban(client_t *);
|
||||||
|
@ -100,6 +99,18 @@ client_isfloating(client_t *c)
|
||||||
|| client_isfixed(c));
|
|| client_isfixed(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns true if a client is tagged
|
||||||
|
* with one of the tags of the specified screen and is not hidden.
|
||||||
|
* \param c The client to check.
|
||||||
|
* \param screen Virtual screen number.
|
||||||
|
* \return true if the client is visible, false otherwise.
|
||||||
|
*/
|
||||||
|
static inline bool
|
||||||
|
client_isvisible(client_t *c, int screen)
|
||||||
|
{
|
||||||
|
return (!c->ishidden && client_maybevisible(c, screen));
|
||||||
|
}
|
||||||
|
|
||||||
/** Check if a client has strut information.
|
/** Check if a client has strut information.
|
||||||
* \param c A client.
|
* \param c A client.
|
||||||
* \return A boolean value, true if the client has strut information.
|
* \return A boolean value, true if the client has strut information.
|
||||||
|
|
Loading…
Reference in New Issue