summaryrefslogtreecommitdiff
path: root/src/wayland/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland/internal.h')
-rw-r--r--src/wayland/internal.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wayland/internal.h b/src/wayland/internal.h
index d519abd..ad6531b 100644
--- a/src/wayland/internal.h
+++ b/src/wayland/internal.h
@@ -370,7 +370,11 @@ void surface_fail(struct wayland_surface *w);
void display_enter(struct wayland_display *c);
void display_leave(struct wayland_display *c);
-struct wayland_surface *conn_surface_for(struct wayland_display *c, struct wl_surface *s);
+static inline struct wayland_surface *conn_surface_for(struct wayland_display *c, struct wl_surface *s)
+{
+ (void)c;
+ return s ? (struct wayland_surface *)wl_surface_get_user_data(s) : NULL;
+}
static inline struct wayland_surface *surface_root(struct wayland_surface *w)
{