From b03d8f685e17f8d37b9be60368cf81732c6977a0 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 15 Nov 2023 18:21:06 +0100 Subject: [PATCH] config/output: skip no-op modeline change --- sway/config/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/config/output.c b/sway/config/output.c index a9984258..c8f58120 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -293,9 +293,9 @@ static void set_modeline(struct wlr_output *output, sway_log(SWAY_ERROR, "Modeline can only be set to DRM output"); return; } - sway_log(SWAY_DEBUG, "Assigning custom modeline to %s", output->name); struct wlr_output_mode *mode = wlr_drm_connector_add_mode(output, drm_mode); - if (mode) { + if (mode && output->current_mode != mode) { + sway_log(SWAY_DEBUG, "Assigning custom modeline to %s", output->name); wlr_output_state_set_mode(pending, mode); } #else