aboutsummaryrefslogtreecommitdiff
path: root/xwayland/shell.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-10-18 14:32:30 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-11-18 15:35:20 +0000
commit85b37127a6e33a3d73a3dd6c5c0d02c3755c91f6 (patch)
tree116481442b0882abeb340a0b311ab11646af332c /xwayland/shell.c
parentd19191ff6bbcb9c91b1d0f2d7233c46c37d153e7 (diff)
xwayland/shell: add wlr_xwayland_shell_v1_surface_from_serial()
Diffstat (limited to 'xwayland/shell.c')
-rw-r--r--xwayland/shell.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xwayland/shell.c b/xwayland/shell.c
index a6ec315b..e48d6283 100644
--- a/xwayland/shell.c
+++ b/xwayland/shell.c
@@ -224,3 +224,14 @@ void wlr_xwayland_shell_v1_set_client(struct wlr_xwayland_shell_v1 *shell,
wl_list_init(&shell->client_destroy.link);
}
}
+
+struct wlr_surface *wlr_xwayland_shell_v1_surface_from_serial(
+ struct wlr_xwayland_shell_v1 *shell, uint64_t serial) {
+ struct wlr_xwayland_surface_v1 *xwl_surface;
+ wl_list_for_each(xwl_surface, &shell->surfaces, link) {
+ if (xwl_surface->serial == serial) {
+ return xwl_surface->surface;
+ }
+ }
+ return NULL;
+}