summaryrefslogtreecommitdiff
path: root/plugins/xrandr/msd-xrandr-manager.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-12 12:42:06 +0200
committerinfirit <[email protected]>2014-11-30 18:26:14 +0100
commit678713889797542419989e9cc9153feca7baebc2 (patch)
tree1b701e9d3d2b5a0f6db33ea547a93d130719e35a /plugins/xrandr/msd-xrandr-manager.c
parent2fcec22d1494b0cfb6a45dfb556847f22edec1ac (diff)
downloadmate-settings-daemon-678713889797542419989e9cc9153feca7baebc2.tar.bz2
mate-settings-daemon-678713889797542419989e9cc9153feca7baebc2.tar.xz
xrandr: Only connect to MateRRScreen's signal after checking it's not NULL
Taken from gnome-settings-deaemon commit:9b1fd55f4e65cad07a3f39de441aca53e34e7473 From: Rodrigo Moya <[email protected]>
Diffstat (limited to 'plugins/xrandr/msd-xrandr-manager.c')
-rw-r--r--plugins/xrandr/msd-xrandr-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c
index d93a045..37ae25f 100644
--- a/plugins/xrandr/msd-xrandr-manager.c
+++ b/plugins/xrandr/msd-xrandr-manager.c
@@ -2337,7 +2337,6 @@ msd_xrandr_manager_start (MsdXrandrManager *manager,
log_msg ("------------------------------------------------------------\nSTARTING XRANDR PLUGIN\n");
manager->priv->rw_screen = mate_rr_screen_new (gdk_screen_get_default (), error);
- g_signal_connect (manager->priv->rw_screen, "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",
@@ -2347,6 +2346,8 @@ msd_xrandr_manager_start (MsdXrandrManager *manager,
return FALSE;
}
+ g_signal_connect (manager->priv->rw_screen, "screen-changed", G_CALLBACK (on_randr_event), manager);
+
log_msg ("State of screen at startup:\n");
log_screen (manager->priv->rw_screen);