[gnome-settings-daemon/gnome-3-6] wacom: Avoid infinite recursion in gsettings callback



commit 692717e2950e3219c4a071ac503b5eda037bd595
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Nov 21 15:42:44 2012 +0100

    wacom: Avoid infinite recursion in gsettings callback
    
    On a tablet PC, EDID matching will fail as the monitor is not
    from Wacom and heuristic matching will be used instead in
    find_output().
    
    find_output() will then write the results in gsettings which
    can cause an infinite recursion since find_output() is being
    called (indirectly) from the gsettings callback in g-s-d.
    
    To avoid this, remove the call to set_display_by_output() in
    find_output().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688811

 plugins/wacom/gsd-wacom-device.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 7b9a3e1..5542de1 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -775,12 +775,10 @@ find_output (GnomeRRScreen  *rr_screen,
 	if (rr_output == NULL) {
 		if (gsd_wacom_device_is_screen_tablet (device)) {
 			rr_output = find_output_by_heuristic (rr_screen, device);
-			if (rr_output == NULL) {
+			if (rr_output == NULL)
 				g_warning ("No fuzzy match based on heuristics was found.");
-			} else {
+			else
 				g_warning ("Automatically mapping tablet to heuristically-found display.");
-				set_display_by_output (device, rr_output);
-			}
 		}
 	}
 



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