diff options
author | Simon Ser <contact@emersion.fr> | 2021-03-29 11:57:31 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-03-29 12:24:26 +0200 |
commit | 96aa18ae4442d89ece0aef02ecbc8d6bf7ba2939 (patch) | |
tree | 11ff1e9feac16120fd449d09dba3c3c537bad79b | |
parent | b89bcffea4fccdf4727f65b58576ba05903daa75 (diff) |
xwayland: assume no WM_HINTS means window wants input
Some X11 clients (e.g. Chromium, sxiv) don't set WM_HINTS. The spec
says:
> Window managers are free to assume convenient values for all fields of the
> WM_HINTS property if a window is mapped without one.
Our wlr_xwayland_icccm_input_model function assumes missing WM_HINTS
means the window doesn't want input, but this is incorrect. Assume the
window wants input unless it explicitly opts-out by setting WM_HINTS.
Closes: https://github.com/swaywm/sway/issues/6107
-rw-r--r-- | xwayland/xwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 0ca44bdd..89459533 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -2024,7 +2024,7 @@ enum wlr_xwayland_icccm_input_model wlr_xwayland_icccm_input_model( xsurface->protocols, xsurface->protocols_len, WM_TAKE_FOCUS); - if (xsurface->hints && xsurface->hints->input) { + if (!xsurface->hints || xsurface->hints->input) { if (take_focus) { return WLR_ICCCM_INPUT_MODEL_LOCAL; } |