diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-17 15:57:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 15:57:13 +0200 |
commit | 765c80e5f7c36df77e9475a662648a0d87b93606 (patch) | |
tree | 21f28277ff5109d9f8ec196a12fc74bbb5dfd994 /sway/desktop/xdg_shell.c | |
parent | 8d56269d9c9f2a5914aeb8f37f5877eb05000906 (diff) | |
parent | 1f0aeae33591fb46b3f8a91ca91975daf2a8bbf9 (diff) |
Merge pull request #2820 from Emantor/fix-mouse-warping-container
Fix mouse warping container
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 46582204..1ed45a6b 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -406,27 +406,19 @@ static void handle_map(struct wl_listener *listener, void *data) { view->natural_height = view->wlr_xdg_surface->surface->current.height; } - view_map(view, view->wlr_xdg_surface->surface); + bool csd = false; if (!view->xdg_decoration) { struct sway_server_decoration *deco = - decoration_from_surface(xdg_surface->surface); - bool csd = !deco || deco->wlr_server_decoration->mode == + decoration_from_surface(xdg_surface->surface); + csd = !deco || deco->wlr_server_decoration->mode == WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT; - view_update_csd_from_client(view, csd); - } - if (xdg_surface->toplevel->client_pending.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); - } } + view_map(view, view->wlr_xdg_surface->surface, + xdg_surface->toplevel->client_pending.fullscreen, csd); + transaction_commit_dirty(); xdg_shell_view->commit.notify = handle_commit; |