Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
xwayland: assume no WM_HINTS means window wants input
Browse files Browse the repository at this point in the history
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: swaywm/sway#6107
  • Loading branch information
emersion authored and kennylevinsen committed Mar 29, 2021
1 parent b89bcff commit 96aa18a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xwayland/xwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 96aa18a

Please sign in to comment.