mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-14 12:57:28 -08:00
destroy and create
This commit is contained in:
parent
7180724502
commit
ba1214ef9a
1 changed files with 13 additions and 11 deletions
24
dwl.c
24
dwl.c
|
@ -2824,17 +2824,19 @@ void
|
||||||
setoverrideredirect(struct wl_listener *listener, void *data)
|
setoverrideredirect(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
Client *c = wl_container_of(listener, c, override_redirect);
|
Client *c = wl_container_of(listener, c, override_redirect);
|
||||||
int type = c->surface.xwayland->override_redirect ? X11Unmanaged : X11Managed;
|
struct wlr_xwayland_surface *xsurface = c->surface.xwayland;
|
||||||
if (!client_surface(c) || !client_surface(c)->mapped) {
|
int mapped = xsurface->surface && xsurface->surface->mapped;
|
||||||
c->type = type;
|
|
||||||
return;
|
if (mapped)
|
||||||
}
|
unmapnotify(&c->unmap, NULL);
|
||||||
/* We already check that this client is mapped */
|
|
||||||
if (type != c->type) {
|
destroynotify(&c->destroy, NULL);
|
||||||
wl_signal_emit_mutable(&client_surface(c)->events.unmap, NULL);
|
xsurface->data = NULL;
|
||||||
c->type = type;
|
createnotifyx11(NULL, xsurface);
|
||||||
wl_signal_emit_mutable(&client_surface(c)->events.map, NULL);
|
c = xsurface->data;
|
||||||
}
|
|
||||||
|
if (mapped)
|
||||||
|
mapnotify(&c->map, xsurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue