[gnome-settings-daemon] wacom: return a valid rotation value in case of error



commit f5c82d0f127061ac1b4f9545725de8b7fd4a6a00
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Tue Aug 21 16:27:43 2012 +0200

    wacom: return a valid rotation value in case of error
    
    when the gnome_rr_screen_new() fails.
    
    The function gsd_wacom_device_get_display_rotation() is
    expected to return a GsdWacomRotation, returning -1 in case
    of error is not a valid rotation value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682361

 plugins/wacom/gsd-wacom-device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 0761c07..c1de506 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -906,7 +906,7 @@ gsd_wacom_device_get_display_rotation (GsdWacomDevice *device)
 	if (rr_screen == NULL) {
 		g_warning ("Failed to create GnomeRRScreen: %s", error->message);
 		g_error_free (error);
-		return -1;
+		return GSD_WACOM_ROTATION_NONE;
 	}
 
 	rr_output = find_output (rr_screen, device);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]