From a8bbd94b7a392e23419489957577777eeee87ae8 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 18 Sep 2025 20:55:42 +0800 Subject: [PATCH] fix: adaptive_sync not apply in init --- src/mango.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mango.c b/src/mango.c index f24eb8d..8fb64ea 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2575,10 +2575,6 @@ void createmon(struct wl_listener *listener, void *data) { } } - if (adaptive_sync) { - enable_adaptive_sync(m, &state); - } - /* The mode is a tuple of (width, height, refresh rate), and each * monitor supports only a specific set of modes. We just pick the * monitor's preferred mode; a more sophisticated compositor would let @@ -2587,6 +2583,10 @@ void createmon(struct wl_listener *listener, void *data) { wlr_output_state_set_mode(&state, wlr_output_preferred_mode(wlr_output)); + if (adaptive_sync) { + enable_adaptive_sync(m, &state); + } + /* Set up event listeners */ LISTEN(&wlr_output->events.frame, &m->frame, rendermon); LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);