[mutter/wip/carlosg/reset-idle-time-on-lid] backends: Update idle time after opening the lid




commit 366f996b4f27e7268b317186d6c1647bf52ea0aa
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Feb 7 15:54:39 2022 +0100

    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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2272>

 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 e4293350c0..e2466ae433 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;
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]