1
0

Accepting request 596235 from home:xiaoguang_wang:branches:GNOME:Factory

- 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).

OBS-URL: https://build.opensuse.org/request/show/596235
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-settings-daemon?expand=0&rev=324
This commit is contained in:
Dominique Leuenberger 2018-04-16 09:22:10 +00:00 committed by Git OBS Bridge
parent f9ff00db71
commit 526ad0172b
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,56 @@
From 78305bcaf7e72beaded5cfb87a37f8b3b8943489 Mon Sep 17 00:00:00 2001
From: Xiaoguang Wang <xwang@suse.com>
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 @@
<summary>Power button action</summary>
<description>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).</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>
</schema>
</schemalist>
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

View File

@ -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

View File

@ -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 \