Accepting request 600992 from GNOME:Factory

- Update gnome-settings-daemon-touch-screen-switch.patch
  (bsc#1086496, glgo#GNOME/gnome-settings-daemon/#29). (forwarded request 600966 from xiaoguang_wang)

OBS-URL: https://build.opensuse.org/request/show/600992
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-settings-daemon?expand=0&rev=149
This commit is contained in:
Dominique Leuenberger 2018-04-27 14:00:01 +00:00 committed by Git OBS Bridge
commit 43040de291
6 changed files with 200 additions and 4587 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
Index: gnome-settings-daemon-3.26.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
Index: b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in
===================================================================
--- gnome-settings-daemon-3.26.0.orig/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in 2017-09-01 14:12:11.000000000 +0200
+++ gnome-settings-daemon-3.26.0/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in 2017-09-14 13:46:40.155168354 +0200
@@ -40,5 +40,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>
--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in 2018-04-04 16:21:09.706263465 +0800
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in 2018-04-04 16:21:25.782315839 +0800
@@ -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="notify-idle-resumed" type="b">
+ <default>true</default>
@ -13,10 +13,10 @@ Index: gnome-settings-daemon-3.26.0/data/org.gnome.settings-daemon.plugins.power
+ </key>
</schema>
</schemalist>
Index: gnome-settings-daemon-3.26.0/plugins/power/gsd-power-manager.c
Index: b/plugins/power/gsd-power-manager.c
===================================================================
--- gnome-settings-daemon-3.26.0.orig/plugins/power/gsd-power-manager.c 2017-09-01 14:12:11.000000000 +0200
+++ gnome-settings-daemon-3.26.0/plugins/power/gsd-power-manager.c 2017-09-14 13:46:40.155168354 +0200
--- a/plugins/power/gsd-power-manager.c 2018-04-04 16:21:09.710263478 +0800
+++ b/plugins/power/gsd-power-manager.c 2018-04-04 16:21:25.782315839 +0800
@@ -153,6 +153,7 @@
NotifyNotification *notification_ups_discharging;
NotifyNotification *notification_low;
@ -33,7 +33,7 @@ Index: gnome-settings-daemon-3.26.0/plugins/power/gsd-power-manager.c
/* Idles */
GnomeIdleMonitor *idle_monitor;
@@ -1514,6 +1516,49 @@
@@ -1527,6 +1529,49 @@
}
static void
@ -83,7 +83,7 @@ Index: gnome-settings-daemon-3.26.0/plugins/power/gsd-power-manager.c
idle_set_mode (GsdPowerManager *manager, GsdPowerIdleMode mode)
{
gboolean ret = FALSE;
@@ -1603,6 +1648,7 @@
@@ -1616,6 +1661,7 @@
action_type = g_settings_get_enum (manager->priv->settings,
"sleep-inactive-ac-type");
}
@ -91,7 +91,7 @@ Index: gnome-settings-daemon-3.26.0/plugins/power/gsd-power-manager.c
do_power_action_type (manager, action_type);
/* turn on screen and restore user-selected brightness level */
@@ -2382,6 +2428,12 @@
@@ -2398,6 +2444,12 @@
static void
handle_resume_actions (GsdPowerManager *manager)
{

View File

@ -0,0 +1,93 @@
From 05f168842f4754fa409029651842e9333f75fe05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com>
Date: Mon, 5 Feb 2018 10:57:00 +0200
Subject: [PATCH] media-keys: Wait forever for GrabAccelerators() to succeed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On slower machines (esp. with tracker and/or dropbox starting on login)
this may take more than the usual timeout of ~25 seconds.
We cannot use the existing retry loop here in this bug, the first call
actually *succeeds* from gnome-shell's side, even if gsd-mediakeys gives
up on waiting for the reply.
So if we called GrabAccelerators again, we would receive no accel IDs
(because all keys are duplicates), and gnome-shell would keep sending
AcceleratorActivated signals with accel IDs that the 1st call has
established resulting in exactly the same "Could not find accelerator
for accel id" as we're trying to fix.
https://bugzilla.gnome.org/show_bug.cgi?id=792353
---
plugins/media-keys/gsd-media-keys-manager.c | 22 ++++++++++++++--------
plugins/media-keys/org.gnome.ShellKeyGrabber.xml | 4 ----
2 files changed, 14 insertions(+), 12 deletions(-)
Index: b/plugins/media-keys/gsd-media-keys-manager.c
===================================================================
--- a/plugins/media-keys/gsd-media-keys-manager.c 2018-04-04 12:50:14.469324589 +0800
+++ b/plugins/media-keys/gsd-media-keys-manager.c 2018-04-04 12:50:33.937584284 +0800
@@ -80,6 +80,7 @@
#define CUSTOM_BINDING_SCHEMA SETTINGS_BINDING_DIR ".custom-keybinding"
+#define SHELL_GRABBER_CALL_TIMEOUT G_MAXINT
#define SHELL_GRABBER_RETRY_INTERVAL 1
#define OSD_ALL_OUTPUTS -1
@@ -427,13 +428,14 @@
GAsyncResult *result,
gpointer user_data)
{
- GVariant *actions;
+ GVariant *ret, *actions;
gboolean retry = FALSE;
GError *error = NULL;
GsdMediaKeysManager *manager = user_data;
- shell_key_grabber_call_grab_accelerators_finish (SHELL_KEY_GRABBER (object),
- &actions, result, &error);
+ ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (object), result, &error);
+ g_variant_get (ret, "(@au)", &actions);
+ g_variant_unref (ret);
if (error) {
retry = (error->code == G_DBUS_ERROR_UNKNOWN_METHOD);
@@ -478,11 +480,15 @@
g_free (tmp);
}
- shell_key_grabber_call_grab_accelerators (manager->priv->key_grabber,
- g_variant_builder_end (&builder),
- manager->priv->grab_cancellable,
- grab_accelerators_complete,
- manager);
+ g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->key_grabber),
+ "GrabAccelerators",
+ g_variant_new ("(@a(su))",
+ g_variant_builder_end (&builder)),
+ G_DBUS_CALL_FLAGS_NONE,
+ SHELL_GRABBER_CALL_TIMEOUT,
+ manager->priv->grab_cancellable,
+ grab_accelerators_complete,
+ manager);
}
static void
Index: b/plugins/media-keys/org.gnome.ShellKeyGrabber.xml
===================================================================
--- a/plugins/media-keys/org.gnome.ShellKeyGrabber.xml 2018-04-04 12:50:14.469324589 +0800
+++ b/plugins/media-keys/org.gnome.ShellKeyGrabber.xml 2018-04-04 12:50:33.937584284 +0800
@@ -6,10 +6,6 @@
<arg type="u" direction="in" name="flags"/>
<arg type="u" direction="out" name="action"/>
</method>
- <method name="GrabAccelerators">
- <arg type="a(su)" direction="in" name="accelerators"/>
- <arg type="au" direction="out" name="actions"/>
- </method>
<method name="UngrabAccelerator">
<arg type="u" direction="in" name="action"/>
<arg type="b" direction="out" name="success"/>

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,31 @@
-------------------------------------------------------------------
Wed Apr 25 09:19:24 UTC 2018 - xwang@suse.com
- Update gnome-settings-daemon-touch-screen-switch.patch
(bsc#1086496, glgo#GNOME/gnome-settings-daemon/#29).
-------------------------------------------------------------------
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).
-------------------------------------------------------------------
Sun Apr 8 06:39:20 UTC 2018 - fezhang@suse.com
- Drop gnome-settings-daemon-bring-back-updates-plugin.patch:
Deprecated on SLE15 / Leap15.0.
- Disable gnome-settings-daemon-more-power-button-actions.patch on
Leap.
-------------------------------------------------------------------
Tue Apr 3 07:58:37 UTC 2018 - fezhang@suse.com
- Add gnome-settings-daemon-timeout-grabbing-keys.patch: Retry
grabbing media-key accelerators when timed out (bgo#792353).
- Rebase gnome-settings-daemon-notify-idle-resumed.patch.
-------------------------------------------------------------------
Tue Mar 20 17:20:36 UTC 2018 - dimstar@opensuse.org

View File

@ -32,7 +32,7 @@ Release: 0
Summary: Settings daemon for the GNOME desktop
License: GPL-2.0-or-later
Group: System/GUI/GNOME
URL: http://www.gnome.org
Url: http://www.gnome.org
Source: http://download.gnome.org/sources/gnome-settings-daemon/3.28/%{name}-%{version}.tar.xz
# PATCH-FEATURE-SLE gnome-settings-daemon-notify-idle-resumed.patch bnc#439018 bnc#708182 bgo#575467 hpj@suse.com -- notify user about auto suspend when returning from sleep
Patch1: gnome-settings-daemon-notify-idle-resumed.patch
@ -40,16 +40,18 @@ Patch1: gnome-settings-daemon-notify-idle-resumed.patch
Patch2: gnome-settings-daemon-bnc873545-hide-warnings.patch
# PATCH-FIX-SLE gnome-settings-daemon-sle-configure-timeout-blank.patch bnc#869685 bgo#710904 cxiong@suse.com -- monitor off timeout is too short, extends it to 5 min
Patch3: gnome-settings-daemon-sle-configure-timeout-blank.patch
# PATCH-FIX-SLE gnome-settings-daemon-more-power-button-actions.patch bsc#996342 fezhang@suse.com -- Bring back the "shutdown" and "interactive" power button actions.
Patch4: gnome-settings-daemon-more-power-button-actions.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-initial-keyboard.patch bsc#979051 boo#1009515 federico@suse.com -- Deal with the default keyboard being set from xkb instead of GNOME
Patch4: gnome-settings-daemon-initial-keyboard.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-bring-back-updates-plugin.patch bsc#991024 sckang@suse.com -- Add the updates plugin back
Patch5: gnome-settings-daemon-bring-back-updates-plugin.patch
# PATCH-FEATURE-OPENSUSE gnome-settings-daemon-more-power-button-actions.patch bsc#996342 fezhang@suse.com -- Bring back the "shutdown" and "interactive" power button actions.
Patch6: gnome-settings-daemon-more-power-button-actions.patch
Patch5: gnome-settings-daemon-initial-keyboard.patch
# PATCH-FIX-OPENSUSE gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch bnc#1029083 boo#1056289 qzhao@suse.com -- Switch new user's default input engine from "anthy" to "mozc" in gnome-desktop with Japanese language and ibus input frame-work condition.
Patch7: gnome-settings-daemon-switch-Japanese-default-input-to-mozc.patch
# PATCH-FIX-UPSTREAM gnome-settings-daemon-timeout-grabbing-keys.patch bgo#792353 fezhang@suse.com -- Retry grabbing media-key accelerators when timed out
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
@ -99,12 +101,6 @@ Requires: polkit
Recommends: %{name}-lang
# For housekeeping plugin, that uses the nautilus dbus service
Recommends: nautilus
%if 0%{?suse_version} == 1315
BuildRequires: gnome-common
%endif
%if 0%{?suse_version} == 1315
BuildRequires: pkgconfig(packagekit-glib2)
%endif
%if %{with wacom}
BuildRequires: pkgconfig(libwacom) >= 0.7
%endif
@ -155,16 +151,13 @@ gnome-patch-translation-prepare
%patch1 -p1
%patch2 -p1
%patch3
%endif
%patch4 -p1
%if 0%{?suse_version} == 1315
%endif
%patch5 -p1
%endif
%if 0%{?suse_version} == 1315 || !0%{?is_opensuse}
%patch6 -p1
%endif
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
%meson \
@ -235,10 +228,6 @@ rm %{buildroot}%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Wacom.deskt
%endif
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-sound
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Sound.desktop
%if 0%{?suse_version} == 1315
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-updates
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Updates.desktop
%endif
%{_libexecdir}/gnome-settings-daemon-3.0/gsd-xsettings
%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.enums.xml
@ -252,11 +241,6 @@ rm %{buildroot}%{_sysconfdir}/xdg/autostart/org.gnome.SettingsDaemon.Wacom.deskt
# From patch2
#%%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.proxy.gschema.xml
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.sharing.gschema.xml
%if 0%{?suse_version} == 1315
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.xml
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.update.policy
%{_libexecdir}/gnome-settings-daemon-3.0/pk-clear-offline-update
%endif
%{_datadir}/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml
%{_datadir}/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
# Own the directory since we can't depend on gconf providing them