mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
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:
parent
8dadfd42df
commit
892446a0b6
5 changed files with 36 additions and 48 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue