From 09538422c6c8f06cd1a30c7da44a8e0d3feed522 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 7 Feb 2022 15:54:39 +0100 Subject: [PATCH] backends: Update idle time after opening the lid When handling lid state, we used to update the idle time right after opening the lid. This behavior changed in commit 14b6c8780d3c due to a typo/thinko, "if (lid_is_closed)" used to be an early return condition before updating idle time, now it only updates in that case. Restore the original behavior, since this idle time update is key in having gsd-power light up the display again, this presumably fixes situations that required extra "light up" hints after suspend. What it does surely fix is "ninja test" in g-s-d against recent mutter, since the behavioral change induced a test timeout there. Part-of: --- src/backends/meta-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index e4293350c..e2466ae43 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -657,7 +657,7 @@ upower_properties_changed (GDBusProxy *proxy, g_signal_emit (backend, signals[LID_IS_CLOSED_CHANGED], 0, priv->lid_is_closed); - if (lid_is_closed) + if (!lid_is_closed) reset_idle_time = TRUE; } }