aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 00:52:21 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 00:52:21 -0600
commit1b22ef16161fe832e14aa29678e09eb7df56e395 (patch)
treecdd35e688e49a6798cc2b25ab90c385566ec22d8
parentf1c92b05fb124d6865d4dfb0c121b3dbf7fd5407 (diff)
use xdg_shell helper
for xwayland continue using wlr_scene_subsurface_create()
-rw-r--r--dwl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 4df0e95..464554c 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1319,8 +1319,9 @@ mapnotify(struct wl_listener *listener, void *data)
/* Create scene tree for this client and its border */
c->scene = &wlr_scene_tree_create(layers[LyrTile])->node;
- c->scene_surface = client_surface(c)->data =
- wlr_scene_subsurface_tree_create(c->scene, client_surface(c));
+ c->scene_surface = client_surface(c)->data = c->type == XDGShell
+ ? wlr_scene_xdg_surface_create(c->scene, c->surface.xdg)
+ : wlr_scene_subsurface_tree_create(c->scene, client_surface(c));
c->scene_surface->data = c;
for (i = 0; i < 4; i++) {
c->border[i] = wlr_scene_rect_create(c->scene, 0, 0, bordercolor);