From a95d9cdf0d1e69c171a17af7fbb8f75869cd54b9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 21 Nov 2012 14:20:37 +0000 Subject: gsd-xrandr: Add new follow-lid behavior and tie gsd-power lid-close to gsd-xrandr There are two problems in the implementation of "turn off laptop screen when lid closed", First, it is not enabled at startup. Second, it conflicts with the gsd-power option to never use external monitors with the lid closed. To fix this, unify the gsd-xrandr default-monitors-setup setting with the aforementioned gsd-power option. The default-monitors-option now has four settings. The new follow-lid mode is the default and matches earlier behavior, plus it also checks the laptop lid state at startup. The follow-lid and clone mode still turn off the laptop screen when the lid is closed, the dock and do-nothing mode leave it apart. With this in place, gsd-power does not need anymore the special option for lid-close-suspend-with-external-monitor. It can just look at the default-monitors-setup setting, and only suspend if that setting is "do-nothing". All other settings imply that you want to keep working on the external monitor. --- data/gsd-enums.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/gsd-enums.h') diff --git a/data/gsd-enums.h b/data/gsd-enums.h index 99d9fbad..8b8f2f5e 100644 --- a/data/gsd-enums.h +++ b/data/gsd-enums.h @@ -79,7 +79,8 @@ typedef enum { GSD_XRANDR_BOOT_BEHAVIOUR_DO_NOTHING, GSD_XRANDR_BOOT_BEHAVIOUR_CLONE, - GSD_XRANDR_BOOT_BEHAVIOUR_DOCK + GSD_XRANDR_BOOT_BEHAVIOUR_DOCK, + GSD_XRANDR_BOOT_BEHAVIOUR_FOLLOW_LID } GsdXrandrBootBehaviour; typedef enum -- cgit v1.2.1