aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernandez Hernandez <leohdz172@protonmail.com>2022-02-01 01:16:56 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-16 09:27:09 -0600
commitb92c0ff57fbf9cc9ffb2a33e689acc08b8745f1d (patch)
tree662a553c23dacdb5c48212568aa7e802d3442dd3 /dwl.c
parent1087bc5db98faf12e02e57433ed52cbc9845e98b (diff)
add support for layer_shell popups
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index 8deee97..0d8a1b1 100644
--- a/dwl.c
+++ b/dwl.c
@@ -871,7 +871,10 @@ void
createnotify(struct wl_listener *listener, void *data)
{
/* This event is raised when wlr_xdg_shell receives a new xdg surface from a
- * client, either a toplevel (application window) or popup. */
+ * client, either a toplevel (application window) or popup,
+ * or when wlr_layer_shell receives a new popup from a layer.
+ * If you want to do something tricky with popups you should check if
+ * its parent is wlr_xdg_shell or wlr_layer_shell */
struct wlr_xdg_surface *xdg_surface = data;
Client *c;
@@ -924,8 +927,8 @@ createlayersurface(struct wl_listener *listener, void *data)
wlr_layer_surface->data = layersurface;
m = wlr_layer_surface->output->data;
- layersurface->scene = wlr_scene_subsurface_tree_create(
- layers[wlr_layer_surface->pending.layer],
+ layersurface->scene = wlr_layer_surface->surface->data =
+ wlr_scene_subsurface_tree_create(layers[wlr_layer_surface->pending.layer],
wlr_layer_surface->surface);
layersurface->scene->data = layersurface;