diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index 06594e9..0f39a45 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -191,6 +191,12 @@ device_info_is_touchscreen (XDeviceInfo *device_info)
 }
 
 gboolean
+device_info_is_tablet (XDeviceInfo *device_info)
+{
+        return (device_info->type == XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XI_TABLET, False));
+}
+
+gboolean
 device_info_is_mouse (XDeviceInfo *device_info)
 {
         return (device_info->type == XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XI_MOUSE, False));
diff --git a/plugins/common/gsd-input-helper.h b/plugins/common/gsd-input-helper.h
index f86d2a4..b93b90c 100644
--- a/plugins/common/gsd-input-helper.h
+++ b/plugins/common/gsd-input-helper.h
@@ -61,6 +61,7 @@ gboolean  device_is_touchpad       (XDevice                *xdevice);
 
 gboolean  device_info_is_touchpad    (XDeviceInfo         *device_info);
 gboolean  device_info_is_touchscreen (XDeviceInfo         *device_info);
+gboolean  device_info_is_tablet (XDeviceInfo         *device_info);
 gboolean  device_info_is_mouse       (XDeviceInfo         *device_info);
 gboolean  device_info_is_trackball   (XDeviceInfo         *device_info);
 
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 9cf1561..4edd0dc 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1581,7 +1581,8 @@ rotate_touchscreens (GsdXrandrManager *mgr,
                         continue;
                 }
 
-                if (device_info_is_touchscreen (&device_info[i])) {
+                if (device_info_is_touchscreen (&device_info[i]) ||
+                            device_info_is_tablet (&device_info[i])) {
                         XDevice *device;
                         char c = evdev_rotations[rot_idx].axes_swap;
                         PropertyHelper axes_swap = {
@@ -1658,7 +1659,7 @@ handle_rotate_windows (GsdXrandrManager *mgr,
                 goto out;
         }
 
-        if (rotation < 0) {
+        if (rotation <= GNOME_RR_ROTATION_NEXT) {
                 /* Which rotation? */
 
                 get_allowed_rotations_for_output (current, priv->rw_screen, rotatable_output_info, &num_allowed_rotations, &allowed_rotations);
