diff options
Diffstat (limited to 'src/xprivate.cpp')
-rw-r--r-- | src/xprivate.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xprivate.cpp b/src/xprivate.cpp index 2cba1b0..de0440d 100644 --- a/src/xprivate.cpp +++ b/src/xprivate.cpp @@ -512,7 +512,7 @@ next:; return None; } -XRRModeInfo* XPrivate::getPreferredMode(OutputInfo *oi, XRRModeInfo *fallback) const +XRRModeInfo* XPrivate::getPreferredMode(const OutputInfo *oi, XRRModeInfo *fallback) const { if (oi->output->nmode == 0) { qDebug() << "getPreferredMode: Output" << oi->outputName << "has no modes!?"; @@ -523,6 +523,10 @@ XRRModeInfo* XPrivate::getPreferredMode(OutputInfo *oi, XRRModeInfo *fallback) c // I can only guess this is a safety measure for old/bad OS or gfx cards // So, determine the aspect ratio by looking at the physical size and if it's ultrawide, look for a // more fitting resolution in the list of supported ones + // UPDATE: Further digging using edid-decode suggests that Xorg parses EDID data improperly, most notably + // not preferring the resolution given in the first DTD block in the base section (first 128b) but rather + // going for the first DTD in the CTA extension block. (This is just a guess since I didn't check the + // Xorg source code.) if (oi->output->mm_height > 0) { float ar = float(oi->output->mm_width) / float(oi->output->mm_height); if (ar >= 1.999f) { // Consider 18:9+ as ultrawide |