diff options
author | fwsmit <fw.smit01@gmail.com> | 2021-01-20 22:15:23 +0100 |
---|---|---|
committer | Ronan Pigott <rpigott@berkeley.edu> | 2021-01-25 11:54:44 -0700 |
commit | 241ce2af83884a07cc2017dd06bbc4d8093052fb (patch) | |
tree | 86f22265b69dbf3d944ad51bf054cb0f58c10ffb /sway | |
parent | 62ec528c8cd6d2f7a70412b632ece65cbd6883b6 (diff) |
Implement foreign toplevel fullscreen output hints
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 7afcdf31..c1ce4e6b 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -651,6 +651,18 @@ static void handle_foreign_fullscreen_request( } } + if (event->fullscreen && event->output && event->output->data) { + struct sway_output *output = event->output->data; + struct sway_workspace *ws = output_get_active_workspace(output); + if (ws && !container_is_scratchpad_hidden(view->container)) { + if (container_is_floating(view->container)) { + workspace_add_floating(ws, view->container); + } else { + workspace_add_tiling(ws, view->container); + } + } + } + container_set_fullscreen(container, event->fullscreen ? FULLSCREEN_WORKSPACE : FULLSCREEN_NONE); if (event->fullscreen) { |