summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSvitozar Cherepii <razotivs@gmail.com>2017-02-03 01:49:04 +0200
committerAdam Jackson <ajax@redhat.com>2017-02-08 12:32:16 -0500
commit1c78bec9ca3cd1975a38bf5ebdba7dea65b309ab (patch)
tree4e649d0af9772c21c84c4f07f6c4dc2605a5e4d8
parent542d9f6807ac06b70f564ccab10af69fa21a1221 (diff)
xwayland: Add hack for FWXGA resolution #99574
For some applications (like fullscreen games) it matters for XRandr resolution to be correctly set and equal to root window resolution. In XServer there is already hack for this, adapted it for XWayland. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99574 Signed-off-by: Svitozar Cherepii <razotivs@gmail.com> Tested-by: Svitozar Cherepii <razotivs@gmail.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r--hw/xwayland/xwayland-cvt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-cvt.c b/hw/xwayland/xwayland-cvt.c
index 9655e104e..8564fdbae 100644
--- a/hw/xwayland/xwayland-cvt.c
+++ b/hw/xwayland/xwayland-cvt.c
@@ -296,6 +296,13 @@ xwayland_cvt(int HDisplay, int VDisplay, float VRefresh, Bool Reduced,
if (Interlaced)
modeinfo.modeFlags |= RR_Interlace;
+ /* FWXGA hack adapted from hw/xfree86/modes/xf86EdidModes.c, because you can't say 1366 */
+ if (HDisplay == 1366 && VDisplay == 768) {
+ modeinfo.width = 1366;
+ modeinfo.hSyncStart--;
+ modeinfo.hSyncEnd--;
+ }
+
snprintf(name, sizeof name, "%dx%d",
modeinfo.width, modeinfo.height);
modeinfo.nameLength = strlen(name);