diff -ur gnome-settings-daemon-2.32.1/plugins/mouse/gsd-mouse-manager.c gnome-settings-daemon-2.32.1-touchpadscrolling/plugins/mouse/gsd-mouse-manager.c
--- gnome-settings-daemon-2.32.1/plugins/mouse/gsd-mouse-manager.c	2010-11-15 13:10:51.000000000 +0000
+++ gnome-settings-daemon-2.32.1-touchpadscrolling/plugins/mouse/gsd-mouse-manager.c	2011-12-09 14:57:07.000000000 +0000
@@ -66,7 +66,9 @@
 #ifdef HAVE_X11_EXTENSIONS_XINPUT_H
 #define KEY_TAP_TO_CLICK        GCONF_TOUCHPAD_DIR "/tap_to_click"
 #define KEY_SCROLL_METHOD       GCONF_TOUCHPAD_DIR "/scroll_method"
+#define KEY_PAD_VERT_SCROLL     GCONF_TOUCHPAD_DIR "/vert_scroll_enabled"
 #define KEY_PAD_HORIZ_SCROLL    GCONF_TOUCHPAD_DIR "/horiz_scroll_enabled"
+#define KEY_PAD_TWOFINGER_SCROLL        GCONF_TOUCHPAD_DIR "/twofinger_scroll_enabled"
 #define KEY_TOUCHPAD_ENABLED    GCONF_TOUCHPAD_DIR "/touchpad_enabled"
 #endif
 
@@ -637,12 +639,12 @@
 }
 
 static int
-set_horiz_scroll (gboolean state)
+set_vert_scroll (gboolean state)
 {
         int numdevices, i, rc;
         XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices);
         XDevice *device;
-        Atom act_type, prop_edge, prop_twofinger;
+        Atom act_type, prop_vert;
         int act_format;
         unsigned long nitems, bytes_after;
         unsigned char *data;
@@ -650,45 +652,77 @@
         if (devicelist == NULL)
                 return 0;
 
-        prop_edge = XInternAtom (GDK_DISPLAY (), "Synaptics Edge Scrolling", False);
-        prop_twofinger = XInternAtom (GDK_DISPLAY (), "Synaptics Two-Finger Scrolling", False);
+        prop_vert = XInternAtom (GDK_DISPLAY (), "Synaptics Edge Scrolling", False);
 
-        if (!prop_edge || !prop_twofinger)
+        if (!prop_vert)
                 return 0;
 
         for (i = 0; i < numdevices; i++) {
                 if ((device = device_is_touchpad (devicelist[i]))) {
                         gdk_error_trap_push ();
                         rc = XGetDeviceProperty (GDK_DISPLAY (), device,
-                                                prop_edge, 0, 1, False,
+                                                prop_vert, 0, 1, False,
                                                 XA_INTEGER, &act_type, &act_format, &nitems,
                                                 &bytes_after, &data);
                         if (rc == Success && act_type == XA_INTEGER &&
                                 act_format == 8 && nitems >= 2) {
-                                data[1] = (state && data[0]);
+                                data[0] = (state) ? 1 : 0;
                                 XChangeDeviceProperty (GDK_DISPLAY (), device,
-                                                        prop_edge, XA_INTEGER, 8,
+                                                        prop_vert, XA_INTEGER, 8,
                                                         PropModeReplace, data, nitems);
                         }
 
                         XFree (data);
+                        XCloseDevice (GDK_DISPLAY (), device);
+                        if (gdk_error_trap_pop ()) {
+                                g_warning ("Error in setting vertical edge scroll on \"%s\"", devicelist[i].name);
+                                continue;
+                        }
+                }
+        }
+
+        XFreeDeviceList (devicelist);
+        return 0;
+}
+
+static int
+set_horiz_scroll (gboolean state)
+{
+        int numdevices, i, rc;
+        XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices);
+        XDevice *device;
+        Atom act_type, prop_horiz;
+        int act_format;
+        unsigned long nitems, bytes_after;
+        unsigned char *data;
+
+        if (devicelist == NULL)
+                return 0;
 
+        prop_horiz = XInternAtom (GDK_DISPLAY (), "Synaptics Edge Scrolling", False);
+
+        if (!prop_horiz)
+                return 0;
+
+        for (i = 0; i < numdevices; i++) {
+                if ((device = device_is_touchpad (devicelist[i]))) {
+                        gdk_error_trap_push ();
                         rc = XGetDeviceProperty (GDK_DISPLAY (), device,
-                                                prop_twofinger, 0, 1, False,
+                                                prop_horiz, 0, 1, False,
                                                 XA_INTEGER, &act_type, &act_format, &nitems,
                                                 &bytes_after, &data);
                         if (rc == Success && act_type == XA_INTEGER &&
                                 act_format == 8 && nitems >= 2) {
-                                data[1] = (state && data[0]);
+                                data[1] = (state) ? 1 : 0;
                                 XChangeDeviceProperty (GDK_DISPLAY (), device,
-                                                        prop_twofinger, XA_INTEGER, 8,
+                                                        prop_horiz, XA_INTEGER, 8,
                                                         PropModeReplace, data, nitems);
                         }
 
                         XFree (data);
                         XCloseDevice (GDK_DISPLAY (), device);
                         if (gdk_error_trap_pop ()) {
-                                g_warning ("Error in setting horiz scroll on \"%s\"", devicelist[i].name);
+                                g_warning ("Error in setting horizontal edge scroll on \"%s\"", devicelist[i].name);
                                 continue;
                         }
                 }
@@ -698,18 +732,13 @@
         return 0;
 }
 
-
-/**
- * Scroll methods are: 0 - disabled, 1 - edge scrolling, 2 - twofinger
- * scrolling
- */
 static int
-set_edge_scroll (int method)
+set_twofinger_scroll (gboolean state)
 {
         int numdevices, i, rc;
         XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices);
         XDevice *device;
-        Atom act_type, prop_edge, prop_twofinger;
+        Atom act_type, prop_twofinger;
         int act_format;
         unsigned long nitems, bytes_after;
         unsigned char *data;
@@ -717,36 +746,21 @@
         if (devicelist == NULL)
                 return 0;
 
-        prop_edge = XInternAtom (GDK_DISPLAY (), "Synaptics Edge Scrolling", False);
         prop_twofinger = XInternAtom (GDK_DISPLAY (), "Synaptics Two-Finger Scrolling", False);
 
-        if (!prop_edge || !prop_twofinger)
+        if (!prop_twofinger)
                 return 0;
 
         for (i = 0; i < numdevices; i++) {
                 if ((device = device_is_touchpad (devicelist[i]))) {
                         gdk_error_trap_push ();
                         rc = XGetDeviceProperty (GDK_DISPLAY (), device,
-                                                prop_edge, 0, 1, False,
-                                                XA_INTEGER, &act_type, &act_format, &nitems,
-                                                &bytes_after, &data);
-                        if (rc == Success && act_type == XA_INTEGER &&
-                                act_format == 8 && nitems >= 2) {
-                                data[0] = (method == 1) ? 1 : 0;
-                                XChangeDeviceProperty (GDK_DISPLAY (), device,
-                                                        prop_edge, XA_INTEGER, 8,
-                                                        PropModeReplace, data, nitems);
-                        }
-
-                        XFree (data);
-
-                        rc = XGetDeviceProperty (GDK_DISPLAY (), device,
                                                 prop_twofinger, 0, 1, False,
                                                 XA_INTEGER, &act_type, &act_format, &nitems,
                                                 &bytes_after, &data);
                         if (rc == Success && act_type == XA_INTEGER &&
                                 act_format == 8 && nitems >= 2) {
-                                data[0] = (method == 2) ? 1 : 0;
+                                data[0] = data[1] = (state) ? 1 : 0;
                                 XChangeDeviceProperty (GDK_DISPLAY (), device,
                                                         prop_twofinger, XA_INTEGER, 8,
                                                         PropModeReplace, data, nitems);
@@ -755,7 +769,7 @@
                         XFree (data);
                         XCloseDevice (GDK_DISPLAY (), device);
                         if (gdk_error_trap_pop ()) {
-                                g_warning ("Error in setting edge scroll on \"%s\"", devicelist[i].name);
+                                g_warning ("Error in setting two finger scroll on \"%s\"", devicelist[i].name);
                                 continue;
                         }
                 }
@@ -908,8 +922,9 @@
         set_disable_w_typing (manager, gconf_client_get_bool (client, KEY_TOUCHPAD_DISABLE_W_TYPING, NULL));
 #ifdef HAVE_X11_EXTENSIONS_XINPUT_H
         set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL), left_handed);
-        set_edge_scroll (gconf_client_get_int (client, KEY_SCROLL_METHOD, NULL));
+        set_vert_scroll (gconf_client_get_bool (client, KEY_PAD_VERT_SCROLL, NULL));
         set_horiz_scroll (gconf_client_get_bool (client, KEY_PAD_HORIZ_SCROLL, NULL));
+        set_twofinger_scroll (gconf_client_get_bool (client, KEY_PAD_TWOFINGER_SCROLL, NULL));
         set_touchpad_enabled (gconf_client_get_bool (client, KEY_TOUCHPAD_ENABLED, NULL));
 #endif
 
@@ -943,14 +958,15 @@
                         set_tap_to_click (gconf_value_get_bool (entry->value),
                                           gconf_client_get_bool (client, KEY_LEFT_HANDED, NULL));
                 }
-        } else if (! strcmp (entry->key, KEY_SCROLL_METHOD)) {
-                if (entry->value->type == GCONF_VALUE_INT) {
-                        set_edge_scroll (gconf_value_get_int (entry->value));
-                        set_horiz_scroll (gconf_client_get_bool (client, KEY_PAD_HORIZ_SCROLL, NULL));
-                }
+        } else if (! strcmp (entry->key, KEY_PAD_VERT_SCROLL)) {
+                if (entry->value->type == GCONF_VALUE_BOOL)
+                        set_vert_scroll (gconf_value_get_bool (entry->value));
         } else if (! strcmp (entry->key, KEY_PAD_HORIZ_SCROLL)) {
                 if (entry->value->type == GCONF_VALUE_BOOL)
                         set_horiz_scroll (gconf_value_get_bool (entry->value));
+        } else if (! strcmp (entry->key, KEY_PAD_TWOFINGER_SCROLL)) {
+                if (entry->value->type == GCONF_VALUE_BOOL)
+                        set_twofinger_scroll (gconf_value_get_bool (entry->value));
 #endif
         } else if (! strcmp (entry->key, KEY_LOCATE_POINTER)) {
                 if (entry->value->type == GCONF_VALUE_BOOL) {
@@ -1032,8 +1048,9 @@
 #ifdef HAVE_X11_EXTENSIONS_XINPUT_H
         set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL),
                           gconf_client_get_bool (client, KEY_LEFT_HANDED, NULL));
-        set_edge_scroll (gconf_client_get_int (client, KEY_SCROLL_METHOD, NULL));
+        set_vert_scroll (gconf_client_get_bool (client, KEY_PAD_VERT_SCROLL, NULL));
         set_horiz_scroll (gconf_client_get_bool (client, KEY_PAD_HORIZ_SCROLL, NULL));
+        set_twofinger_scroll (gconf_client_get_bool (client, KEY_PAD_TWOFINGER_SCROLL, NULL));
         set_touchpad_enabled (gconf_client_get_bool (client, KEY_TOUCHPAD_ENABLED, NULL));
 #endif
 
