[gnome-settings-daemon] xrandr: Only connect to GnomeRRScreen's signal after checking it's not NULL
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xrandr: Only connect to GnomeRRScreen's signal after checking it's not NULL
- Date: Wed, 21 Sep 2011 09:47:10 +0000 (UTC)
commit 9b1fd55f4e65cad07a3f39de441aca53e34e7473
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Wed Sep 21 11:47:03 2011 +0200
xrandr: Only connect to GnomeRRScreen's signal after checking it's not NULL
plugins/xrandr/gsd-xrandr-manager.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 4ccf5d1..7f0fe0b 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1861,7 +1861,6 @@ gsd_xrandr_manager_start (GsdXrandrManager *manager,
log_msg ("------------------------------------------------------------\nSTARTING XRANDR PLUGIN\n");
manager->priv->rw_screen = gnome_rr_screen_new (gdk_screen_get_default (), error);
- g_signal_connect (manager->priv->rw_screen, "changed", G_CALLBACK (on_randr_event), manager);
if (manager->priv->rw_screen == NULL) {
log_msg ("Could not initialize the RANDR plugin%s%s\n",
@@ -1871,6 +1870,8 @@ gsd_xrandr_manager_start (GsdXrandrManager *manager,
return FALSE;
}
+ g_signal_connect (manager->priv->rw_screen, "changed", G_CALLBACK (on_randr_event), manager);
+
log_msg ("State of screen at startup:\n");
log_screen (manager->priv->rw_screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]