[gnome-settings-daemon] rfkill: Inhibit rfkill-input's rfkill keys handling
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] rfkill: Inhibit rfkill-input's rfkill keys handling
- Date: Thu, 4 May 2017 15:09:27 +0000 (UTC)
commit ccceec40f8302973af47d64846d4c6ea12a938af
Author: Benjamin Berg <bberg redhat com>
Date: Tue Apr 18 11:58:10 2017 +0200
rfkill: Inhibit rfkill-input's rfkill keys handling
Disable the kernel's handling of rfkill input events when the
session is active, so that multiple logins of GNOME, or use of any
sessions without this handling can fall back onto the kernel's support.
https://bugzilla.gnome.org/show_bug.cgi?id=760517
plugins/rfkill/gsd-rfkill-manager.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/rfkill/gsd-rfkill-manager.c b/plugins/rfkill/gsd-rfkill-manager.c
index 17933c5..a4e0356 100644
--- a/plugins/rfkill/gsd-rfkill-manager.c
+++ b/plugins/rfkill/gsd-rfkill-manager.c
@@ -76,6 +76,9 @@ struct GsdRfkillManagerPrivate
GDBusObjectManager *mm_client;
gboolean wwan_interesting;
+ GsdSessionManager *session;
+ GBinding *rfkill_input_inhibit_binding;
+
gchar *chassis_type;
};
@@ -522,6 +525,11 @@ on_bus_gotten (GObject *source_object,
NULL,
NULL,
NULL);
+
+ manager->priv->session = gnome_settings_bus_get_session_proxy ();
+ manager->priv->rfkill_input_inhibit_binding = g_object_bind_property (manager->priv->session,
"session-is-active",
+ manager->priv->rfkill,
"rfkill-input-inhibited",
+ G_BINDING_SYNC_CREATE);
}
static void
@@ -716,6 +724,8 @@ gsd_rfkill_manager_stop (GsdRfkillManager *manager)
g_clear_pointer (&p->introspection_data, g_dbus_node_info_unref);
g_clear_object (&p->connection);
+ g_clear_object (&p->rfkill_input_inhibit_binding);
+ g_clear_object (&p->session);
g_clear_object (&p->rfkill);
g_clear_pointer (&p->killswitches, g_hash_table_destroy);
g_clear_pointer (&p->bt_killswitches, g_hash_table_destroy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]