diff options
author | BrassyPanache <brassy.panache@gmail.com> | 2021-01-13 01:10:38 +1100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-20 10:38:58 +0100 |
commit | d6649a8a4ba19fda25fe8607bc62acea8acb5fed (patch) | |
tree | b101454595c1e1bc627074693d2f2b8f21593c7d /include | |
parent | f6fe43971876082b0c201696bf01dcd57de866c3 (diff) |
Expose ICCCM input status
In certain situations windows can have their input field set to false
but still expect to receive input focus by passively listening to key
presses via a parent window. The ICCCM specification outlines how focus
should be given to clients.
Further reading: https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7
Relates to #2604
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/xwayland.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index fd14ff25..7dcb3935 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -120,6 +120,18 @@ struct wlr_xwayland_surface_size_hints { }; /** + * This represents the input focus described as follows: + * + * https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#input_focus + */ +enum wlr_xwayland_icccm_input_model { + WLR_ICCCM_INPUT_MODEL_NONE = 0, + WLR_ICCCM_INPUT_MODEL_PASSIVE = 1, + WLR_ICCCM_INPUT_MODEL_LOCAL = 2, + WLR_ICCCM_INPUT_MODEL_GLOBAL = 3, +}; + +/** * An Xwayland user interface component. It has an absolute position in * layout-local coordinates. * @@ -303,7 +315,10 @@ void wlr_xwayland_surface_ping(struct wlr_xwayland_surface *surface); * false if it should be ignored */ bool wlr_xwayland_or_surface_wants_focus( - const struct wlr_xwayland_surface *surface); + const struct wlr_xwayland_surface *xsurface); + +enum wlr_xwayland_icccm_input_model wlr_xwayland_icccm_input_model( + const struct wlr_xwayland_surface *xsurface); #endif |