Blame SOURCES/0001-power-Check-that-the-output-is-connected-when-determ.patch

39d272
From 47af2a6b8349a3edbea7aab2152d859d6c4c23bd Mon Sep 17 00:00:00 2001
39d272
From: Rui Matos <tiagomatos@gmail.com>
39d272
Date: Mon, 28 Apr 2014 21:56:51 +0200
39d272
Subject: [PATCH] power: Check that the output is connected when determining if
39d272
 it's ON
39d272
39d272
It might happen that there's no device connected and yet the CRTC
39d272
associated with an output has a valid mode.
39d272
39d272
RRGetOutputInfo tells us if the hardware was able to detect a device
39d272
connected to the output so let's use that.
39d272
39d272
Note that in versions newer than 3.8, this check isn't required since
39d272
the list of outputs that we get from mutter's DisplayConfig interface
39d272
is already filtered by mutter and doesn't contain any disconnected
39d272
outputs.
39d272
39d272
https://bugzilla.redhat.com/show_bug.cgi?id=1081093
39d272
---
39d272
 plugins/power/gpm-common.c | 2 ++
39d272
 1 file changed, 2 insertions(+)
39d272
39d272
diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
39d272
index b1ce32a..70e4591 100644
39d272
--- a/plugins/power/gpm-common.c
39d272
+++ b/plugins/power/gpm-common.c
39d272
@@ -1694,6 +1694,8 @@ randr_output_is_on (GnomeRROutput *output)
39d272
 {
39d272
         GnomeRRCrtc *crtc;
39d272
 
39d272
+        if (!gnome_rr_output_is_connected (output))
39d272
+                return FALSE;
39d272
         crtc = gnome_rr_output_get_crtc (output);
39d272
         if (!crtc)
39d272
                 return FALSE;
39d272
-- 
39d272
1.9.0
39d272