Merge branch 'fix-floating-disappear'

This commit is contained in:
Michael Stapelberg 2012-01-29 18:02:44 +00:00
commit 714c8fcbe7
1 changed files with 6 additions and 1 deletions

View File

@ -754,7 +754,8 @@ void randr_query_outputs() {
DLOG("next = %p\n", next); DLOG("next = %p\n", next);
} }
/* 2: iterate through workspaces and re-assign them */ /* 2: iterate through workspaces and re-assign them, fixing the coordinates
* of floating containers as we go */
Con *current; Con *current;
Con *old_content = output_get_content(output->con); Con *old_content = output_get_content(output->con);
while (!TAILQ_EMPTY(&(old_content->nodes_head))) { while (!TAILQ_EMPTY(&(old_content->nodes_head))) {
@ -763,6 +764,10 @@ void randr_query_outputs() {
con_detach(current); con_detach(current);
DLOG("Re-attaching current = %p / %s\n", current, current->name); DLOG("Re-attaching current = %p / %s\n", current, current->name);
con_attach(current, first_content, false); con_attach(current, first_content, false);
DLOG("Fixing the coordinates of floating containers\n");
Con *floating_con;
TAILQ_FOREACH(floating_con, &(current->floating_head), floating_windows)
floating_fix_coordinates(floating_con, &(old_content->rect), &(first_content->rect));
DLOG("Done, next\n"); DLOG("Done, next\n");
} }
DLOG("re-attached all workspaces\n"); DLOG("re-attached all workspaces\n");