Comment 6 for bug 1759950

Revision history for this message
TJ (tj) wrote :

More search seems to point to a 2015 commit that integrated light-locker into xfce4-power-manager. This patch in particular appears to attempt to work with logind Lid handling too:

commit 10076da7caa49320b3e907d319a9f27ee6702969
Author: Sean Davis <email address hidden>
Date: Sat Feb 7 11:49:31 2015 +0300

    Light Locker Integration (Bug #11488)

    Integrate Light Locker configuration into Xfce Power Manager. This
    allows proper settings synchronization between the two applications
    and eliminates some of the hackiness used in Light Locker Settings
    to accomplish the same effect, and streamlines similar tools into
    a single location. This depends on light-locker 1.5.1 configured
    with the GSettings backend.

    Signed-off-by: Eric Koegel <email address hidden>

...
+/* Light Locker Integration */
+void
+xfpm_update_logind_handle_lid_switch (XfconfChannel *channel)
+{
+ gboolean lock_on_suspend = xfconf_channel_get_bool (channel, PROPERTIES_PREFIX LOCK_SCREEN_ON_SLEEP, TRUE);
+ guint lid_switch_on_ac = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX LID_SWITCH_ON_AC_CFG, LID_TRIGGER_LOCK_SCREEN);
+ guint lid_switch_on_battery = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX LID_SWITCH_ON_BATTERY_CFG, LID_TRIGGER_LOCK_SCRE
EN);
+
+ // logind-handle-lid-switch = true when: lock_on_suspend == true and (lid_switch_on_ac == suspend or lid_switch_on_battery == suspend)
+ xfconf_channel_set_bool (channel, PROPERTIES_PREFIX LOGIND_HANDLE_LID_SWITCH, lock_on_suspend && (lid_switch_on_ac == 1 || lid_switch_on_battery == 1));
+}
+/* END Light Locker Integration */
+