Make fullscreen windows open on the output which is indicated by their geometry

With this change, multi-monitor presentations (e.g. as implemented by
LibreOffice Impress) work out of the box. Previously, one had to move
the presentation windows to the right outputs oneself.
This commit is contained in:
wentasah
2016-04-06 21:19:10 +02:00
committed by Michael Stapelberg
parent 66d9c983e4
commit fec1a9511e
6 changed files with 132 additions and 1 deletions

@ -1157,6 +1157,19 @@ void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool
_con_move_to_con(con, target, true, fix_coordinates, dont_warp, ignore_focus);
}
/*
* Moves the given container to the currently focused container on the
* visible workspace on the given output.
*
*/
void con_move_to_output(Con *con, Output *output) {
Con *ws = NULL;
GREP_FIRST(ws, output_get_content(output->con), workspace_is_visible(child));
assert(ws != NULL);
DLOG("Moving con %p to output %s\n", con, output->name);
con_move_to_workspace(con, ws, false, false, false);
}
/*
* Returns the orientation of the given container (for stacked containers,
* vertical orientation is used regardless of the actual orientation of the