diff options
author | emersion <contact@emersion.fr> | 2017-10-08 18:02:11 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-10-08 18:02:11 +0200 |
commit | e66e18f4de6996a5c8d923668834096b61b60110 (patch) | |
tree | 80c1edb3e768deab852284722913a771e632770f /rootston/wl_shell.c | |
parent | 3774d6c2c0d8072cd742d21c2996cf53bca9f78a (diff) |
Only center toplevel wl_shell views
Diffstat (limited to 'rootston/wl_shell.c')
-rw-r--r-- | rootston/wl_shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 2df36dc3..81c41f76 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -54,7 +54,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) { wl_container_of(listener, roots_surface, surface_commit); struct roots_view *view = roots_surface->view; - if (!roots_surface->initialized) { + if (view->wl_shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_TOPLEVEL && + !roots_surface->initialized) { bool centered = view_center(view); if (centered) { roots_surface->initialized = true; |