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

@ -481,8 +481,10 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl
floating_assign_to_workspace(client, t_ws);
bool target_invisible = t_ws->screen->current_workspace != t_ws->num;
/* If were moving it to an invisible screen, we need to unmap it */
if (t_ws->screen->current_workspace != t_ws->num) {
if (target_invisible) {
LOG("This workspace is not visible, unmapping\n");
xcb_unmap_window(conn, client->frame);
} else {
@ -504,7 +506,8 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl
render_layout(conn);
set_focus(conn, client, true);
if (!target_invisible)
set_focus(conn, client, true);
}
/*