mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-08 08:21:00 -04:00
It looks like the function only works if xdg_surface->role == TOPLEVEL, so I included a skip for WLR_XDG_SURFACE_ROLE_NONE
This commit is contained in:
parent
eb1ddd782b
commit
e6d06ed14b
1 changed files with 4 additions and 1 deletions
5
dwl.c
5
dwl.c
|
|
@ -882,7 +882,7 @@ createnotify(struct wl_listener *listener, void *data)
|
||||||
struct wlr_xdg_surface *xdg_surface = data;
|
struct wlr_xdg_surface *xdg_surface = data;
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL) {
|
if (xdg_surface->role == WLR_XDG_SURFACE_ROLE_POPUP) {
|
||||||
Client *sel = selclient();
|
Client *sel = selclient();
|
||||||
struct wlr_box pop_box = {
|
struct wlr_box pop_box = {
|
||||||
.x = sel->geom.x - selmon->m.x,
|
.x = sel->geom.x - selmon->m.x,
|
||||||
|
|
@ -894,6 +894,9 @@ createnotify(struct wl_listener *listener, void *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xdg_surface->role != WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Allocate a Client for this surface */
|
/* Allocate a Client for this surface */
|
||||||
c = xdg_surface->data = calloc(1, sizeof(*c));
|
c = xdg_surface->data = calloc(1, sizeof(*c));
|
||||||
c->surface.xdg = xdg_surface;
|
c->surface.xdg = xdg_surface;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue