From 67e9787e36c20e0c9fb1db12fcbe1033b85ed912 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 24b8513..67447b5 100644 --- a/src/mango.c +++ b/src/mango.c @@ -2619,10 +2619,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 @@ -2631,6 +2627,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);