[wip] src/view.c: add view_move_to_output()

This allows moving a view to another output.
The way we currently do this is pretty much a hack and should be
replaced with a better approach. This function now confines this
hack in a single place and allows future enhancements.

Initially implemented for only defining the output to use for
unmapped surfaces, this implementation now also allows moving
usual views to different outputs by supplying the apply_layout
argument.

This patch also replaces usages of the output selection hack with
the new function.
This commit is contained in:
Consolatis 2023-02-12 07:53:34 +01:00
parent e6bfcdb815
commit 03dbdc10f2
5 changed files with 72 additions and 8 deletions

View file

@ -146,6 +146,8 @@ bool view_is_always_on_top(struct view *view);
bool view_is_tiled(struct view *view);
bool view_is_floating(struct view *view);
void view_move_to_workspace(struct view *view, struct workspace *workspace);
void view_move_to_output(struct view *view, struct output *output, bool apply_layout);
void view_set_decorations(struct view *view, bool decorations);
void view_toggle_fullscreen(struct view *view);
void view_adjust_for_layout_change(struct view *view);