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:
committed by
Michael Stapelberg
parent
66d9c983e4
commit
fec1a9511e
10
src/manage.c
10
src/manage.c
@ -359,8 +359,16 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
|
||||
if (xcb_reply_contains_atom(state_reply, A__NET_WM_STATE_FULLSCREEN)) {
|
||||
/* If this window is already fullscreen (after restarting!), skip
|
||||
* toggling fullscreen, that would drop it out of fullscreen mode. */
|
||||
if (fs != nc)
|
||||
if (fs != nc) {
|
||||
Output *output = get_output_with_dimensions((Rect){geom->x, geom->y, geom->width, geom->height});
|
||||
/* If the requested window geometry spans the whole area
|
||||
* of an output, move the window to that output. This is
|
||||
* needed e.g. for LibreOffice Impress multi-monitor
|
||||
* presentations to work out of the box. */
|
||||
if (output != NULL)
|
||||
con_move_to_output(nc, output);
|
||||
con_toggle_fullscreen(nc, CF_OUTPUT);
|
||||
}
|
||||
fs = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user