summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-06-26 14:18:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-06-26 14:19:32 +0100
commitc5651254c3c152daf1ed79073779c1bed6ed0a9b (patch)
treedb973948b20bf977bbb349d0acb542a5106caf16 /src
parent8a6a21bff86100144ba7960fc32a299ac54ada83 (diff)
sna: Fallback to xf86InitialConfiguration if nothing is connected
Use the default mechanism for picking a fallback output and mode if nothing is connected at X startup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 8c8d8444..c7d46718 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -3086,6 +3086,9 @@ static bool sna_probe_initial_configuration(struct sna *sna)
height = h;
}
+ if (!width || !height)
+ return false;
+
scrn->display->frameX0 = 0;
scrn->display->frameY0 = 0;
scrn->display->virtualX = width;
@@ -3095,7 +3098,7 @@ static bool sna_probe_initial_configuration(struct sna *sna)
scrn->virtualY = height;
xf86SetScrnInfoModes(sna->scrn);
- return true;
+ return scrn->modes != NULL;
}
bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna)