LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gnome-settings-daemon-touch-screen-switch.patch of Package gnome-settings-daemon (Project openSUSE:Leap:15.0:Update)

Index: gnome-settings-daemon-3.26.2/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
===================================================================
--- gnome-settings-daemon-3.26.2.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ gnome-settings-daemon-3.26.2/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -35,6 +35,11 @@
       <_summary>Enable the ALS sensor</_summary>
       <_description>If the ambient light sensor functionality is enabled.</_description>
     </key>
+    <key name="disable-touch-screen" type="b">
+      <default>true</default>
+      <_summary>Disable touch screen input when screen is off</_summary>
+      <_description>Disable touch screen input when screen is off</_description>
+    </key>
     <key name="power-button-action" enum="org.gnome.settings-daemon.GsdPowerButtonActionType">
       <default>'suspend'</default>
       <_summary>Power button action</_summary>
Index: gnome-settings-daemon-3.26.2/plugins/power/gsd-power-manager.c
===================================================================
--- gnome-settings-daemon-3.26.2.orig/plugins/power/gsd-power-manager.c
+++ gnome-settings-daemon-3.26.2/plugins/power/gsd-power-manager.c
@@ -938,6 +938,9 @@ screen_devices_disable (GsdPowerManager
         GdkDeviceManager *device_manager;
         GList *devices, *l;
 
+        if (!g_settings_get_boolean (manager->priv->settings, "disable-touch-screen"))
+                return;
+
         /* This will be managed by the compositor eventually on X11 too:
          * https://bugzilla.gnome.org/show_bug.cgi?id=742598
          */
@@ -976,6 +979,9 @@ screen_devices_enable (GsdPowerManager *
 {
         GList *l, *disabled_devices;
 
+        if (!g_settings_get_boolean (manager->priv->settings, "disable-touch-screen"))
+                return;
+
         if (gnome_settings_is_wayland ())
                 return;