diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 133d9f6..01d9ee7 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -514,8 +514,22 @@ device_is_touchpad (XDeviceInfo deviceinfo)
 static int
 set_disable_w_typing (GsdMouseManager *manager, gboolean state)
 {
+        gboolean touchpad_present = FALSE;
+        int numdevices, i;
+        XDeviceInfo *devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices);
+        XDevice *device;
 
-        if (state) {
+        if (devicelist == NULL)
+                return 0;
+
+        for (i = 0; i < numdevices; i++) {
+                if ((device = device_is_touchpad (devicelist[i]))) {
+                        touchpad_present = TRUE;
+                        break;
+                }
+        }
+
+        if (state && touchpad_present) {
                 GError *error = NULL;
                 char *args[5];
 
