[gnome-settings-daemon] wacom: Remove GsdWacomDevice dependency on GsdDeviceMapper
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Remove GsdWacomDevice dependency on GsdDeviceMapper
- Date: Tue, 20 Jan 2015 19:43:54 +0000 (UTC)
commit 96ff40d8beca67b3d7f6b5584cd42e231d73cfec
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 20 18:29:03 2015 +0100
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
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 308bf6b..4fbd85e 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]