From 60b0ab065772c3f109d7471c0d6d814d477f9803 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Fri, 29 Oct 2010 12:31:07 -0500 Subject: (randr) bnc#647304 - If the stored configuration fails at startup, use the fallback configurations Previously, if a stored configuration existed but it could not be applied due to nonmatching monitors, we would do nothing else - potentially leaving the user in whatever startup state was used by the X server. Now, in that condition we simply fall back to trying the system-global configuration or the boot-time configuration. Signed-off-by: Federico Mena Quintero --- plugins/xrandr/msd-xrandr-manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index e74b7d9..75e41dd 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -2168,10 +2168,11 @@ apply_intended_configuration (MsdXrandrManager *manager, const char *intended_fi gboolean result; my_error = NULL; - result = apply_configuration_from_filename (manager, intended_filename, FALSE, timestamp, &my_error); + result = apply_configuration_from_filename (manager, intended_filename, TRUE, timestamp, &my_error); if (!result) { if (my_error) { - if (!g_error_matches (my_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) + if (!g_error_matches (my_error, G_FILE_ERROR, G_FILE_ERROR_NOENT) && + !g_error_matches (my_error, MATE_RR_ERROR, MATE_RR_ERROR_NO_MATCHING_CONFIG)) error_message (manager, _("Could not apply the stored configuration for monitors"), my_error, NULL); g_error_free (my_error); -- cgit v1.2.1