1
0
Dominique Leuenberger 2018-04-13 06:43:11 +00:00 committed by Git OBS Bridge
parent c50d11f9cd
commit f9ff00db71
4 changed files with 116 additions and 13 deletions

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

@ -1,3 +1,10 @@
-------------------------------------------------------------------
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
@ -48,6 +48,8 @@ Patch5: gnome-settings-daemon-bring-back-updates-plugin.patch
Patch6: gnome-settings-daemon-more-power-button-actions.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
BuildRequires: cups-devel
@ -164,6 +166,7 @@ gnome-patch-translation-prepare
%patch6 -p1
%endif
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build