Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
avoid layer surface popups appearing below x{dg,wayland} clients
Browse files Browse the repository at this point in the history
  • Loading branch information
sevz17 committed Jun 24, 2022
1 parent 097b4a3 commit 549335a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dwl.c
Expand Up @@ -952,9 +952,14 @@ createnotify(struct wl_listener *listener, void *data)

if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
struct wlr_box box;
LayerSurface *l;
void *toplevel = toplevel_from_popup(xdg_surface->popup);
xdg_surface->surface->data = wlr_scene_xdg_surface_create(
xdg_surface->popup->parent->data, xdg_surface);
if (!(c = toplevel_from_popup(xdg_surface->popup)) || !c->mon)
if (wlr_surface_is_layer_surface(xdg_surface->popup->parent) && (l = toplevel)
&& l->layer_surface->current.layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
wlr_scene_node_reparent(xdg_surface->surface->data, layers[LyrTop]);
if (!(c = toplevel) || !c->mon)
return;
box = c->type == LayerShell ? c->mon->m : c->mon->w;
box.x -= c->geom.x;
Expand Down

0 comments on commit 549335a

Please sign in to comment.