From 96aa18ae4442d89ece0aef02ecbc8d6bf7ba2939 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 29 Mar 2021 11:57:31 +0200 Subject: [PATCH] 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 --- xwayland/xwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }