diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-29 17:19:30 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-12-05 18:48:15 +0100 |
commit | 532f3d3c206e71f2ee9cc6b3f5a277210ec8cdd7 (patch) | |
tree | fef07f3ace7da5c124d69611e68915b19f077bd0 /include/wlr/xwayland | |
parent | 512deebd82ce200305869a706a3cb046d7077eb3 (diff) |
xwayland/xwm: replace role with addon
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3545
Diffstat (limited to 'include/wlr/xwayland')
-rw-r--r-- | include/wlr/xwayland/xwayland.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h index 2a68315c..a8580c0e 100644 --- a/include/wlr/xwayland/xwayland.h +++ b/include/wlr/xwayland/xwayland.h @@ -13,6 +13,7 @@ #include <wayland-server-core.h> #include <xcb/xcb.h> #include <xcb/xcb_icccm.h> +#include <wlr/util/addon.h> struct wlr_xwm; struct wlr_data_source; @@ -89,6 +90,10 @@ struct wlr_xwayland_surface { struct wl_list unpaired_link; struct wlr_surface *surface; + struct wlr_addon surface_addon; + struct wl_listener surface_commit; + struct wl_listener surface_precommit; + int16_t x, y; uint16_t width, height; uint16_t saved_width, saved_height; @@ -227,15 +232,17 @@ void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland, struct wlr_seat *seat); /** - * Returns true if the surface has the xwayland surface role. + * Check whether a surface is an Xwayland surface. + * + * As an edge case, if the surface has been created by Xwayland but has no X11 + * window associated, false is returned. */ bool wlr_surface_is_xwayland_surface(struct wlr_surface *surface); /** * Get a struct wlr_xwayland_surface from a struct wlr_surface. - * Asserts that the surface has the xwayland surface role. - * May return NULL even if the surface has the xwayland surface role if the - * corresponding xwayland surface has been unmapped or destroyed. + * + * This function asserts that the surface is an Xwayland surface. */ struct wlr_xwayland_surface *wlr_xwayland_surface_from_wlr_surface( struct wlr_surface *surface); |