[gnome-settings-daemon/gnome-3-4] gnome-settings-daemon: fix applying settings to newly added touchpads



commit 3a16a838f1ca373b891f20c1509359f360e79bca
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Apr 5 13:10:23 2012 -0400

    gnome-settings-daemon: fix applying settings to newly added touchpads
    
    In GTK+-3.4, touchpads no longer are classified as GDK_SOURCE_MOUSE,
    they are GDK_SOURCE_TOUCHPAD, so we need to add a check for that
    in the handling for newly added devices, or touchpads won't get
    configured properly when returning from suspend.
    
    Required GTK+ version is bumped to 3.3.18 for the GDK_SOURCE_TOUCHPAD
    enum value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673595

 configure.ac                      |    2 +-
 plugins/mouse/gsd-mouse-manager.c |   10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 43f5afb..1896a82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ dnl - Dependencies
 dnl ---------------------------------------------------------------------------
 
 GLIB_REQUIRED_VERSION=2.31.0
-GTK_REQUIRED_VERSION=3.3.4
+GTK_REQUIRED_VERSION=3.3.18
 GCONF_REQUIRED_VERSION=2.6.1
 GIO_REQUIRED_VERSION=2.26.0
 GNOME_DESKTOP_REQUIRED_VERSION=3.3.92
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 9af0553..49ffb9d 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -1014,7 +1014,10 @@ device_added_cb (GdkDeviceManager *device_manager,
                  GdkDevice        *device,
                  GsdMouseManager  *manager)
 {
-        if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE) {
+        GdkInputSource source;
+
+        source = gdk_device_get_source (device);
+        if (source == GDK_SOURCE_MOUSE || source == GDK_SOURCE_TOUCHPAD) {
                 if (run_custom_command (device, COMMAND_DEVICE_ADDED) == FALSE) {
                         set_mouse_settings (manager, device);
                 } else {
@@ -1034,7 +1037,10 @@ device_removed_cb (GdkDeviceManager *device_manager,
                    GdkDevice        *device,
                    GsdMouseManager  *manager)
 {
-        if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE) {
+        GdkInputSource source;
+
+        source = gdk_device_get_source (device);
+        if (source == GDK_SOURCE_MOUSE || source == GDK_SOURCE_TOUCHPAD) {
                 int id;
 
                 run_custom_command (device, COMMAND_DEVICE_REMOVED);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]