mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-14 04:47:30 -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)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, override_redirect);
|
||||
int type = c->surface.xwayland->override_redirect ? X11Unmanaged : X11Managed;
|
||||
if (!client_surface(c) || !client_surface(c)->mapped) {
|
||||
c->type = type;
|
||||
return;
|
||||
}
|
||||
/* We already check that this client is mapped */
|
||||
if (type != c->type) {
|
||||
wl_signal_emit_mutable(&client_surface(c)->events.unmap, NULL);
|
||||
c->type = type;
|
||||
wl_signal_emit_mutable(&client_surface(c)->events.map, NULL);
|
||||
}
|
||||
struct wlr_xwayland_surface *xsurface = c->surface.xwayland;
|
||||
int mapped = xsurface->surface && xsurface->surface->mapped;
|
||||
|
||||
if (mapped)
|
||||
unmapnotify(&c->unmap, NULL);
|
||||
|
||||
destroynotify(&c->destroy, NULL);
|
||||
xsurface->data = NULL;
|
||||
createnotifyx11(NULL, xsurface);
|
||||
c = xsurface->data;
|
||||
|
||||
if (mapped)
|
||||
mapnotify(&c->map, xsurface);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue