Bugfix: Correctly handle floating windows when unmapping, fix focus bug when moving

This commit is contained in:
Michael Stapelberg
2009-06-25 13:31:58 +02:00
parent b16ab02cc7
commit aa2f20ce26
3 changed files with 10 additions and 7 deletions

View File

@ -598,6 +598,8 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
if ((con->currently_focused != NULL) && ((con == CUR_CELL) || client->fullscreen))
set_focus(conn, con->currently_focused, true);
} else if (client_is_floating(client)) {
LOG("Removing from floating clients\n");
TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
SLIST_REMOVE(&(client->workspace->focus_stack), client, Client, focus_clients);
}
@ -606,11 +608,6 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti
SLIST_REMOVE(&(client->workspace->screen->dock_clients), client, Client, dock_clients);
}
if (client->floating) {
LOG("Removing from floating clients\n");
TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
}
LOG("child of 0x%08x.\n", client->frame);
xcb_reparent_window(conn, client->child, root, 0, 0);
xcb_destroy_window(conn, client->frame);