view: move arrange_workspace into view_map

For mouse_warping cursor to correctly work on newly spawned containers,
the workspace needs to be arranged before the cursor is warped.

The shell functions each implement their own fullscreen and arrange checks,
move them into the view_map function and pass their states via boolean arguments.

Fixes #2819
This commit is contained in:
Rouven Czerwinski 2018-10-13 21:01:02 +02:00
parent 8dadfd42df
commit 892446a0b6
5 changed files with 36 additions and 48 deletions

View file

@ -405,18 +405,8 @@ static void handle_map(struct wl_listener *listener, void *data) {
xwayland_view->commit.notify = handle_commit;
// Put it back into the tree
view_map(view, xsurface->surface);
view_map(view, xsurface->surface, xsurface->fullscreen, false);
if (xsurface->fullscreen) {
container_set_fullscreen(view->container, true);
arrange_workspace(view->container->workspace);
} else {
if (view->container->parent) {
arrange_container(view->container->parent);
} else if (view->container->workspace) {
arrange_workspace(view->container->workspace);
}
}
transaction_commit_dirty();
}