[gnome-desktop] Revert "GnomeRRConfig: try again when failing application because of access denied"
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Revert "GnomeRRConfig: try again when failing application because of access denied"
- Date: Tue, 20 Aug 2013 08:16:45 +0000 (UTC)
commit f9dbf4ae8a12ce5da1d446b18be181646ac53bb0
Author: Giovanni Campagna <gcampagn redhat com>
Date: Tue Aug 20 10:15:26 2013 +0200
Revert "GnomeRRConfig: try again when failing application because of access denied"
This reverts commit dc85c78445c3f543bf1a91cb0e7e69ef7db3a817.
Calling gnome_rr_screen_refresh() cause the emission of signals,
which in turn cause the configuration to be dropped (and then
a segfault)
We need a better solution.
libgnome-desktop/gnome-rr-config.c | 50 +----------------------------------
1 files changed, 2 insertions(+), 48 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr-config.c b/libgnome-desktop/gnome-rr-config.c
index 184b7da..7d0eb65 100644
--- a/libgnome-desktop/gnome-rr-config.c
+++ b/libgnome-desktop/gnome-rr-config.c
@@ -633,30 +633,7 @@ gnome_rr_config_apply (GnomeRRConfig *config,
GnomeRRScreen *screen,
GError **error)
{
- gboolean ok;
- GError *local_error;
-
- local_error = NULL;
- ok = gnome_rr_config_apply_helper (config, screen, FALSE, &local_error);
- if (!ok)
- {
- if (g_error_matches (local_error, G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED))
- {
- /* Stale configuration, refresh and try again */
- g_error_free (local_error);
-
- if (!gnome_rr_screen_refresh (screen, error))
- return FALSE;
-
- return gnome_rr_config_apply_helper (config, screen, FALSE, error);
- }
- else
- {
- g_propagate_error (error, local_error);
- }
- }
-
- return ok;
+ return gnome_rr_config_apply_helper (config, screen, FALSE, error);
}
gboolean
@@ -664,30 +641,7 @@ gnome_rr_config_apply_persistent (GnomeRRConfig *config,
GnomeRRScreen *screen,
GError **error)
{
- gboolean ok;
- GError *local_error;
-
- local_error = NULL;
- ok = gnome_rr_config_apply_helper (config, screen, TRUE, &local_error);
- if (!ok)
- {
- if (g_error_matches (local_error, G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED))
- {
- /* Stale configuration, refresh and try again */
- g_error_free (local_error);
-
- if (!gnome_rr_screen_refresh (screen, error))
- return FALSE;
-
- return gnome_rr_config_apply_helper (config, screen, TRUE, error);
- }
- else
- {
- g_propagate_error (error, local_error);
- }
- }
-
- return ok;
+ return gnome_rr_config_apply_helper (config, screen, TRUE, error);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]