mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-04 04:20:24 -04:00
allow unmanaged clients (like dzen or dmenu) to have keyboard focus
This commit is contained in:
parent
9e912cf790
commit
332ceb7136
2 changed files with 31 additions and 9 deletions
11
client.h
11
client.h
|
@ -275,6 +275,17 @@ client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
|
|||
return wlr_xdg_surface_surface_at(c->surface.xdg, cx, cy, sx, 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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue