Don't destroy client windows in unmanage
When a client is unmanaged, we destroy our frame window. But since the client's own window was still a child of the frame window, it was destroyed, too. This commit fixes this by reparenting the client's window back to the root window first. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
52f4581be3
commit
a311ab0679
1
event.c
1
event.c
|
@ -630,7 +630,6 @@ event_handle_unmapnotify(xcb_unmap_notify_event_t *ev)
|
||||||
if((c = client_getbywin(ev->window)))
|
if((c = client_getbywin(ev->window)))
|
||||||
{
|
{
|
||||||
client_unmanage(c);
|
client_unmanage(c);
|
||||||
xcb_unmap_window(globalconf.connection, ev->window);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
for(int i = 0; i < globalconf.embedded.len; i++)
|
for(int i = 0; i < globalconf.embedded.len; i++)
|
||||||
|
|
|
@ -1031,12 +1031,16 @@ client_unmanage(client_t *c)
|
||||||
|
|
||||||
ewmh_update_net_client_list(c->phys_screen);
|
ewmh_update_net_client_list(c->phys_screen);
|
||||||
|
|
||||||
|
xcb_screen_t *s = xutil_screen_get(globalconf.connection, c->phys_screen);
|
||||||
|
xcb_unmap_window(globalconf.connection, c->window);
|
||||||
|
xcb_reparent_window(globalconf.connection, c->window, s->root,
|
||||||
|
c->geometry.x, c->geometry.y);
|
||||||
|
xcb_destroy_window(globalconf.connection, c->frame_window);
|
||||||
|
|
||||||
/* Remove this window from the save set since this shouldn't be made visible
|
/* Remove this window from the save set since this shouldn't be made visible
|
||||||
* after a restart anymore. */
|
* after a restart anymore. */
|
||||||
xcb_change_save_set(globalconf.connection, XCB_SET_MODE_DELETE, c->window);
|
xcb_change_save_set(globalconf.connection, XCB_SET_MODE_DELETE, c->window);
|
||||||
|
|
||||||
xcb_destroy_window(globalconf.connection, c->frame_window);
|
|
||||||
|
|
||||||
/* set client as invalid */
|
/* set client as invalid */
|
||||||
c->invalid = true;
|
c->invalid = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue