diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2015-01-20 18:29:03 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2015-01-20 20:42:03 +0100 |
commit | 96ff40d8beca67b3d7f6b5584cd42e231d73cfec (patch) | |
tree | 9712dd6870716df6aad6ea5a6c008255e8d47132 | |
parent | 316564a917be6765a02b76802c876efcac31ae9c (diff) | |
download | gnome-settings-daemon-96ff40d8beca67b3d7f6b5584cd42e231d73cfec.tar.gz |
wacom: Remove GsdWacomDevice dependency on GsdDeviceMapper
Just lookup the display from settings using internal functions, instead
of looking it up from the GsdDeviceMapper
https://bugzilla.gnome.org/show_bug.cgi?id=743196
-rw-r--r-- | plugins/wacom/gsd-wacom-device.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c index 308bf6b6..4fbd85e8 100644 --- a/plugins/wacom/gsd-wacom-device.c +++ b/plugins/wacom/gsd-wacom-device.c @@ -34,7 +34,6 @@ #include <X11/extensions/XInput2.h> #include "gsd-input-helper.h" -#include "gsd-device-mapper.h" #include "gsd-enums.h" #include "gsd-wacom-device.h" @@ -833,18 +832,16 @@ gsd_wacom_device_get_display_monitor (GsdWacomDevice *device) GsdWacomRotation gsd_wacom_device_get_display_rotation (GsdWacomDevice *device) { + GnomeRRScreen *rr_screen; GnomeRROutput *rr_output; GnomeRRRotation rotation = GNOME_RR_ROTATION_0; - GsdDevice *gsd_device; - gsd_device = gsd_x11_device_manager_lookup_gdk_device (GSD_X11_DEVICE_MANAGER (gsd_device_manager_get ()), - device->priv->gdk_device); + rr_screen = gnome_rr_screen_new (gdk_screen_get_default (), NULL); - if (!gsd_device) + if (rr_screen == NULL) return GSD_WACOM_ROTATION_NONE; - rr_output = gsd_device_mapper_get_device_output (gsd_device_mapper_get (), - gsd_device); + rr_output = find_output_by_display (rr_screen, device); if (rr_output) { GnomeRRCrtc *crtc = gnome_rr_output_get_crtc (rr_output); @@ -852,6 +849,8 @@ gsd_wacom_device_get_display_rotation (GsdWacomDevice *device) rotation = gnome_rr_crtc_get_current_rotation (crtc); } + g_object_unref (rr_screen); + return get_rotation_wacom (rotation); } |