aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2018-10-13 21:01:02 +0200
committerLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2018-10-16 15:47:02 +0200
commit892446a0b6eba9d14cdf7462c86565a7a60d12ae (patch)
tree1740c18381767afad7e13703d1cfa7b2e7f013dd /sway/desktop/xwayland.c
parentMerge pull request #2817 from trmendes/libinput-disable-touchscreen-support (diff)
downloadsway-892446a0b6eba9d14cdf7462c86565a7a60d12ae.tar.gz
sway-892446a0b6eba9d14cdf7462c86565a7a60d12ae.tar.zst
sway-892446a0b6eba9d14cdf7462c86565a7a60d12ae.zip
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
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index ebf2131e..066556b8 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -405,18 +405,8 @@ static void handle_map(struct wl_listener *listener, void *data) {
405 xwayland_view->commit.notify = handle_commit; 405 xwayland_view->commit.notify = handle_commit;
406 406
407 // Put it back into the tree 407 // Put it back into the tree
408 view_map(view, xsurface->surface); 408 view_map(view, xsurface->surface, xsurface->fullscreen, false);
409 409
410 if (xsurface->fullscreen) {
411 container_set_fullscreen(view->container, true);
412 arrange_workspace(view->container->workspace);
413 } else {
414 if (view->container->parent) {
415 arrange_container(view->container->parent);
416 } else if (view->container->workspace) {
417 arrange_workspace(view->container->workspace);
418 }
419 }
420 transaction_commit_dirty(); 410 transaction_commit_dirty();
421} 411}
422 412