[gnome-settings-daemon] media-keys: Stop treating tablets specially



commit 425828ed0ff85bc58d8b343a6fa45e83d1c75f35
Author: Hans de Goede <hdegoede redhat com>
Date:   Fri May 3 16:59:33 2019 +0200

    media-keys: Stop treating tablets specially
    
    There are problems with treating the power-button on tablets in a special
    manner:
    
    1) The configuration for the power-button behavior is now part of the
    main control-center power capplet, so it is visible to all users. It is
    very strange and inconsistent for users with a device which gets identified
    as a tablet that they can configure the behavior of the button in the
    control-center but the behavior does not change.
    
    2) The method used to determine if something is a tablet is unreliable,
    various surface like devices and some laptops wrongly have "Tablet"
    as chassis-type. So relying on chassis-type info for this is a bad idea.
    
    This commit removes the special handling of the power-button on tablets,
    falling back to the normal behavior of doing what the user has configured.

 plugins/media-keys/gsd-media-keys-manager.c | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index a3c9113b..d945a823 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -2124,12 +2124,6 @@ do_config_power_button_action (GsdMediaKeysManager *manager,
                 return;
         }
 
-        /* Always suspend tablets */
-        if (g_strcmp0 (priv->chassis_type, "tablet") == 0) {
-                power_action (manager, "Suspend", !in_lock_screen);
-                return;
-        }
-
         action_type = g_settings_get_enum (priv->power_settings, "power-button-action");
         switch (action_type) {
         case GSD_POWER_BUTTON_ACTION_SUSPEND:


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