From 3c6f2f29bf1e1fed571b7ee0715bb65151399c63 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 8 Oct 2017 17:28:19 +0200 Subject: Do not remove the commit listener --- rootston/xdg_shell_v6.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rootston') diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index c9c2368a..2471b3ee 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -72,9 +72,11 @@ static void handle_commit(struct wl_listener *listener, void *data) { wl_container_of(listener, roots_xdg_surface, commit); struct roots_view *view = roots_xdg_surface->view; - bool centered = view_center(view); - if (centered) { - wl_list_remove(&listener->link); + if (!roots_xdg_surface->initialized) { + bool centered = view_center(view); + if (centered) { + roots_xdg_surface->initialized = true; + } } } -- cgit v1.2.3