summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-30 20:23:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-31 10:35:36 +0100
commit82dbe3ff81a9f3775f8588c919062317d1cd60a0 (patch)
tree64ada21fa8f572d749d4dbd7deb31b177dcd63ab /src
parent6d99249c580cfb062a05ce1da446410741eb1223 (diff)
sna: Mark fake outputs as disconnected until a user applies a mode
Hide the fake outputs until they are instantiated by a user. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_display_fake.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index afd5588f..73fca7e6 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -143,19 +143,25 @@ sna_output_dpms(xf86OutputPtr output, int dpms)
static xf86OutputStatus
sna_output_detect(xf86OutputPtr output)
{
- return XF86OutputStatusUnknown;
+ if (output->randr_output->numUserModes)
+ return XF86OutputStatusConnected;
+
+ return XF86OutputStatusDisconnected;
}
static Bool
sna_output_mode_valid(xf86OutputPtr output, DisplayModePtr mode)
{
+ if (mode->type & M_T_DEFAULT)
+ return MODE_BAD;
+
return MODE_OK;
}
static DisplayModePtr
sna_output_get_modes(xf86OutputPtr output)
{
- return xf86GetDefaultModes();
+ return NULL;
}
static void