[gnome-settings-daemon] xrandr: Avoid the GnomePnpIds object being created multiple times
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xrandr: Avoid the GnomePnpIds object being created multiple times
- Date: Wed, 19 Dec 2012 16:20:13 +0000 (UTC)
commit c9240e8b69c5833074508b46bc56307aac12ec19
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 19 15:31:22 2012 +0100
xrandr: Avoid the GnomePnpIds object being created multiple times
It's a singleton, but GnomeRR is the only user here, so create
one before we know it's going to be used multiple times to
make sure only one instance is created at a time.
plugins/xrandr/gsd-xrandr-manager.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 9cf1561..8bab752 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -45,6 +45,7 @@
#include <libgnome-desktop/gnome-rr-config.h>
#include <libgnome-desktop/gnome-rr.h>
+#include <libgnome-desktop/gnome-pnp-ids.h>
#ifdef HAVE_WACOM
#include <libwacom/libwacom.h>
@@ -1906,7 +1907,9 @@ apply_stored_configuration_at_startup (GsdXrandrManager *manager, guint32 timest
gboolean success;
char *backup_filename;
char *intended_filename;
+ GnomePnpIds *pnp_ids;
+ pnp_ids = gnome_pnp_ids_new ();
backup_filename = gnome_rr_config_get_backup_filename ();
intended_filename = gnome_rr_config_get_intended_filename ();
@@ -1946,6 +1949,7 @@ apply_stored_configuration_at_startup (GsdXrandrManager *manager, guint32 timest
success = apply_intended_configuration (manager, intended_filename, timestamp);
out:
+ g_object_unref (pnp_ids);
if (my_error)
g_error_free (my_error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]