aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-10-08 17:28:19 +0200
committeremersion <contact@emersion.fr>2017-10-08 17:28:19 +0200
commit3c6f2f29bf1e1fed571b7ee0715bb65151399c63 (patch)
tree7a6a33fb1e1842e9c9f8e226a38138898c002fd2 /rootston
parentd09d01236ba5804320bc9ad7d592c5077205f878 (diff)
Do not remove the commit listener
Diffstat (limited to 'rootston')
-rw-r--r--rootston/xdg_shell_v6.c8
1 files changed, 5 insertions, 3 deletions
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;
+ }
}
}