wlroots/include/wlr
John Lindgren 5083efe18b xwayland: add wlr_xwayland_surface_offer_focus()
In labwc, we have had trouble with XWayland windows using the Globally
Active input model (see wlr_xwayland_icccm_input_model()). Under
traditional X11, these windows do not expect to be given focus directly
by the window manager; rather, the WM sends them a WM_TAKE_FOCUS message
prompting the client to take focus voluntarily.

Currently, these clients are difficult to support with wlroots, because
wlr_xwayland_surface_activate() assumes the client window will always
accept the keyboard focus after being sent WM_TAKE_FOCUS. Some Globally
Active client windows (e.g. panels/toolbars) don't want to be focused.
It's useless at best to focus them, and might even make them misbehave.
Others do need keyboard focus to be functional -- and there doesn't seem
to be any reliable way to know this in advance.

Adding wlr_xwayland_surface_offer_focus() allows the compositor to send
WM_TAKE_FOCUS to a client window supporting it and then see whether the
client accepts or ignores the offer. If it accepts, the surface will emit
the focus_in signal notifying the compositor that it has received focus.

This is entirely opt-in. A compositor that doesn't want to use the new
function can continue to call wlr_xwayland_surface_activate() directly
just as before.
2024-08-01 13:19:24 +00:00
..
backend backend/wayland: introduce wlr_wl_output_set_app_id() 2024-06-26 19:43:20 +00:00
interfaces backend/drm: add support for SIZE_HINTS property 2024-07-10 22:42:44 +00:00
render render/drm_syncobj: add helpers to wait for timeline points 2024-06-12 18:39:45 +02:00
types docs: update comments for wlr_output API changes 2024-07-15 12:30:06 +00:00
util Use standard __VA_OPT__ instead of GNU's ##__VA_ARGS__ 2024-06-27 18:13:05 +00:00
xwayland xwayland: add wlr_xwayland_surface_offer_focus() 2024-08-01 13:19:24 +00:00
backend.h backend: add wlr_backend_{test,commit}() 2024-03-14 22:03:10 +00:00
config.h.in render/color: introduce wlr_color_transform 2024-04-26 17:17:36 +00:00
meson.build Version pkgconfig, headers, and library for parallel installation 2024-05-27 22:15:00 +00:00
version.h.in Drop WLR_VERSION_API_* 2021-06-29 12:22:55 +02:00
xcursor.h examples, tinywl: use "default" cursor instead of "left_ptr" 2023-02-01 15:00:42 +01:00
xwayland.h xwayland: split headers 2022-11-02 19:00:23 +01:00