diff options
author | Erik Reider <[email protected]> | 2023-07-28 06:38:37 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-28 00:38:37 -0400 |
commit | a2b827ab71f51240a192fa20913f6e83d8528612 (patch) | |
tree | 2d7bbb2ed7de4efe9a835f038f3695924d788f76 /tinywl | |
parent | 67103a7c47ffcbedd876eeba2d0aa439616359e3 (diff) |
Tinywl: stop asserting that all surfaces are xdg_surfaces (#15)
Diffstat (limited to 'tinywl')
-rw-r--r-- | tinywl/tinywl.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c index d4f4e7f..f6e1254 100644 --- a/tinywl/tinywl.c +++ b/tinywl/tinywl.c @@ -613,8 +613,14 @@ static void output_configure_scene(struct wlr_scene_node *node, struct wlr_scene_surface * scene_surface = wlr_scene_surface_from_buffer(buffer); - struct wlr_xdg_surface *xdg_surface = - wlr_xdg_surface_from_wlr_surface(scene_surface->surface); + if (!scene_surface) { + return; + } + + struct wlr_xdg_surface *xdg_surface = NULL; + if (wlr_surface_is_xdg_surface(scene_surface->surface)) { + xdg_surface = wlr_xdg_surface_from_wlr_surface(scene_surface->surface); + } if (xdg_surface && xdg_surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL) { |