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 14b6c8780d 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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2272>
This commit is contained in:
Carlos Garnacho 2022-02-07 15:54:39 +01:00 committed by Marge Bot
parent abadb29132
commit 09538422c6

View File

@ -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;
}
}