[gnome-settings-daemon/gnome-3-8] power: Check that the output is connected when determining if it's ON
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-8] power: Check that the output is connected when determining if it's ON
- Date: Mon, 5 May 2014 14:25:29 +0000 (UTC)
commit dd89bb93610b641f8c2b1b87c262dcf4e5405e6d
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Apr 28 21:56:51 2014 +0200
power: Check that the output is connected when determining if it's ON
It might happen that there's no device connected and yet the CRTC
associated with an output has a valid mode.
RRGetOutputInfo tells us if the hardware was able to detect a device
connected to the output so let's use that.
Note that in versions newer than 3.8, this check isn't required since
the list of outputs that we get from mutter's DisplayConfig interface
is already filtered by mutter and doesn't contain any disconnected
outputs.
https://bugzilla.redhat.com/show_bug.cgi?id=1081093
plugins/power/gpm-common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
index 5c8b121..822abea 100644
--- a/plugins/power/gpm-common.c
+++ b/plugins/power/gpm-common.c
@@ -1692,6 +1692,8 @@ randr_output_is_on (GnomeRROutput *output)
{
GnomeRRCrtc *crtc;
+ if (!gnome_rr_output_is_connected (output))
+ return FALSE;
crtc = gnome_rr_output_get_crtc (output);
if (!crtc)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]