[gnome-settings-daemon] mouse: Replace loop with call to ensure_touchpad_active()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] mouse: Replace loop with call to ensure_touchpad_active()
- Date: Mon, 19 Jan 2015 16:48:29 +0000 (UTC)
commit e1da6c900b008ddaea5cfb66c653e9d5087275c4
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 19 17:42:55 2015 +0100
mouse: Replace loop with call to ensure_touchpad_active()
Both are functionally equivalent now, so simplify the code a bit.
plugins/mouse/gsd-mouse-manager.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 7a5d27b..2825482 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -106,6 +106,8 @@ static void gsd_mouse_manager_finalize (GObject *object);
static void set_tap_to_click (GdkDevice *device,
gboolean state,
gboolean left_handed);
+static void ensure_touchpad_active (GsdMouseManager *manager);
+
G_DEFINE_TYPE (GsdMouseManager, gsd_mouse_manager, G_TYPE_OBJECT)
@@ -1207,16 +1209,8 @@ touchpad_callback (GSettings *settings,
}
g_list_free (devices);
- if (g_str_equal (key, KEY_SEND_EVENTS) &&
- get_touchpad_enabled (manager)) {
- devices = get_disabled_devices (manager->priv->device_manager);
- for (l = devices; l != NULL; l = l->next) {
- int device_id;
-
- device_id = GPOINTER_TO_INT (l->data);
- set_touchpad_enabled (device_id);
- }
- g_list_free (devices);
+ if (g_str_equal (key, KEY_SEND_EVENTS)) {
+ ensure_touchpad_active (manager);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]