xserver-multidpi/hw/xwayland
Olivier Fourdan 058809c43e xwayland: Apply output rotation for screen size
Previously, we would swap the width/height of the Xwayland output based
on the output rotation, so that the overall screen size would match the
actual rotation of each output.

Problem is the RandR's ConstrainCursorHarder() handler will also apply
the output rotation, meaning that when the output is rotated, the
pointer will be constrained within the wrong dimension.

Moreover, XRandR assumes the original output width/height are unchanged
when the output is rotated, so by changing the Xwayland output width and
height based on rotation, Xwayland causes XRandr to report the wrong
output sizes (an output of size 1024x768 rotated left or right should
remain 1024x768, not 768x1024).

So to avoid this issue and keep things consistent between Wayland and
Xwayland outputs, leave the actual width/height unchanged but apply the
rotation when computing the screen size. This fixes both the output size
being wrong in "xrandr -q" and the pointer being constrained in the
wrong dimension with rotated with weston.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99663
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-02-08 13:22:19 -05:00
..
.gitignore xwayland: Bind pointer constraints global 2016-10-05 13:50:46 -04:00
drm.xml xwayland: Add glamor and DRI3 support 2014-06-24 15:09:55 -07:00
Makefile.am xwayland: Bind pointer constraints global 2016-10-05 13:50:46 -04:00
xwayland-cursor.c xwayland: Add pointer warp emulator 2016-10-05 13:51:02 -04:00
xwayland-cvt.c xwayland: Add hack for FWXGA resolution #99574 2017-02-08 12:32:16 -05:00
xwayland-glamor-xv.c xwayland: Fix compiler warning in GLAMOR Xv 2016-04-15 16:22:16 -04:00
xwayland-glamor.c glamor: Use eglGetPlatformDisplay{,EXT} if we can 2016-10-05 16:03:13 -04:00
xwayland-input.c xwayland: replace hardcoded function name with __func__ in error msg 2017-02-08 09:50:44 +10:00
xwayland-output.c xwayland: Apply output rotation for screen size 2017-02-08 13:22:19 -05:00
xwayland-shm.c xwayland-shm: block signals during fallocate 2016-11-01 14:00:04 -04:00
xwayland-vidmode.c xwayland: Pretend we support viewport in vidmode 2016-03-28 14:10:59 -04:00
xwayland.c xwayland: fix order of calloc() args 2016-11-25 11:35:53 +10:00
xwayland.h xwayland: Add pointer warp emulator 2016-10-05 13:51:02 -04:00