Only center toplevel wl_shell views
@@ -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;
