diff --git a/gnome-settings-daemon-touch-screen-switch.patch b/gnome-settings-daemon-touch-screen-switch.patch new file mode 100644 index 0000000..4cc439a --- /dev/null +++ b/gnome-settings-daemon-touch-screen-switch.patch @@ -0,0 +1,56 @@ +From 78305bcaf7e72beaded5cfb87a37f8b3b8943489 Mon Sep 17 00:00:00 2001 +From: Xiaoguang Wang +Date: Sun, 8 Apr 2018 17:05:34 +0800 +Subject: [PATCH] power: Add touch screen input switch + +Use this switch to disable or enable touch screen +input when screen is off. + +https://bugzilla.gnome.org/show_bug.cgi?id=778961#c4 +--- + data/org.gnome.settings-daemon.plugins.power.gschema.xml.in | 5 +++++ + plugins/power/gsd-power-manager.c | 6 ++++++ + 2 files changed, 11 insertions(+) + +diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in +index 93c704e9..a6aee267 100644 +--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in ++++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in +@@ -41,5 +41,10 @@ + Power button action + The action to take when the system power button is pressed. This action is hard-coded (and the setting ignored) on virtual machines (power off) and tablets (suspend). + ++ ++ true ++ <_summary>Disable touch screen input when screen is off ++ <_description>Disable touch screen input when screen is off ++ + + +diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c +index 82d81e96..37f8fa94 100644 +--- a/plugins/power/gsd-power-manager.c ++++ b/plugins/power/gsd-power-manager.c +@@ -937,6 +937,9 @@ screen_devices_disable (GsdPowerManager *manager) + 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 + */ +@@ -975,6 +978,9 @@ screen_devices_enable (GsdPowerManager *manager) + { + GList *l, *disabled_devices; + ++ if (!g_settings_get_boolean (manager->priv->settings, "disable-touch-screen")) ++ return; ++ + if (gnome_settings_is_wayland ()) + return; + +-- +2.12.3 + diff --git a/gnome-settings-daemon.changes b/gnome-settings-daemon.changes index b921f28..f2a492c 100644 --- a/gnome-settings-daemon.changes +++ b/gnome-settings-daemon.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 13 08:54:24 UTC 2018 - xwang@suse.com + +- Add gnome-settings-daemon-touch-screen-switch.patch: Add touch + screen input switch, user can enable touch screen input when + screen is off(bsc#1086496, glgo#GNOME/gnome-settings-daemon/#29). + ------------------------------------------------------------------- Tue Apr 3 07:58:37 UTC 2018 - fezhang@suse.com diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 8aa16a4..46a3c1a 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -52,6 +52,8 @@ Patch7: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patc Patch8: gnome-settings-daemon-timeout-grabbing-keys.patch # PATCH-FIX-UPSTREAM gnome-settings-daemon-bgo793253.patch bgo#793253 dimstar@opensuse.org -- Fix no-return-in-nonvoid-function Patch9: gnome-settings-daemon-bgo793253.patch +# PATCH-FEATURE-OPENSUSE gnome-settings-daemon-touch-screen-switch.patch bsc#1086496 xwang@suse.com -- Add touch screen input switch. +Patch10: gnome-settings-daemon-touch-screen-switch.patch BuildRequires: cups-devel BuildRequires: fdupes BuildRequires: gnome-patch-translation @@ -168,6 +170,7 @@ gnome-patch-translation-prepare %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build %meson \