aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/xwayland/xwayland.h
diff options
context:
space:
mode:
authorJohn Lindgren <john@jlindgren.net>2024-02-12 18:37:55 -0500
committerJohn Lindgren <john@jlindgren.net>2024-02-23 12:46:25 -0500
commit2521fba37c396909eec6da88070ec9111aa2c507 (patch)
tree2b4290c8b05b9a3759a68cf2598094d0fb97e14b /include/wlr/xwayland/xwayland.h
parent51c1e4aed19ad31a93eeb36cd9ca2d7b889897c1 (diff)
xwayland: add map_request signal
For XWayland surfaces that start maximized, it's best to send an initial Configure event to set the size of the surface before mapping it. This reduces visual glitches since the application sees the correct maximized size when performing its initial layout and drawing. wlroots surfaces emit their first "map" event after the XWayland window has already been mapped and the first frame has been drawn & committed. This is too late to send the initial Configure event. So, add a new "map_request" event which is emitted immediately before telling XWayland to map the window. Compositors can connect to this event to send the initial Configure event to an XWayland app based on its requested maximized (or fullscreen) state. Compositors should not place anything visually on the screen at this point but rather wait until the "map" event as before.
Diffstat (limited to 'include/wlr/xwayland/xwayland.h')
-rw-r--r--include/wlr/xwayland/xwayland.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h
index cb9e35f0..ff08796c 100644
--- a/include/wlr/xwayland/xwayland.h
+++ b/include/wlr/xwayland/xwayland.h
@@ -169,6 +169,8 @@ struct wlr_xwayland_surface {
struct wl_signal set_strut_partial;
struct wl_signal set_override_redirect;
struct wl_signal set_geometry;
+ /* can be used to set initial maximized/fullscreen geometry */
+ struct wl_signal map_request;
struct wl_signal ping_timeout;
} events;