diff options
author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-06-16 16:05:07 -0500 |
---|---|---|
committer | Leonardo Hernández <leohdz172@protonmail.com> | 2022-10-15 18:00:24 -0500 |
commit | 332ceb7136da268ff3e62f32d40bc8969f0aca37 (patch) | |
tree | 0c613894cd081b192cb5a8b13cf367b3353e2c48 /client.h | |
parent | 9e912cf790b6f4120dd4baaee1aad924f279581b (diff) |
allow unmanaged clients (like dzen or dmenu) to have keyboard focus
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -276,6 +276,17 @@ client_surface_at(Client *c, double cx, double cy, double *sx, double *sy) } static inline int +client_wants_focus(Client *c) +{ +#ifdef XWAYLAND + return client_is_unmanaged(c) + && wlr_xwayland_or_surface_wants_focus(c->surface.xwayland) + && wlr_xwayland_icccm_input_model(c->surface.xwayland) != WLR_ICCCM_INPUT_MODEL_NONE; +#endif + return 0; +} + +static inline int client_wants_fullscreen(Client *c) { #ifdef XWAYLAND |