weston/libweston
Pekka Paalanen 8060d826b7 Redefine output rotations
It was discovered in issue #99 that the implementations of the 90 and 270
degree rotations were actually the inverse of what the Wayland specification
spelled out. This patch fixes the libweston implementation to follow the
specification.

As a result, the behaviour of the the weston.ini transform key also changes. To
force all users to re-think their configuration, the transform key values are
also changed. Since Weston and libweston change their behaviour, the handling
of clients' buffer transform changes too.

All the functions had their 90/270 cases simply swapped, probably due to
confusion of whether WL_OUTPUT_TRANSFORM_* refers to rotating the monitor or
the content.

Hint: a key to understanding weston_matrix_rotate_xy(m, c, s) is that the
rotation matrix is formed as

  c -s
  s  c

that is, it's column-major. This fooled me at first.

Fixing window.c fixes weston-terminal and weston-transformed.

In simple-damage, window_get_transformed_ball() is fixed to follow the proper
transform definitions, but the fix to the viewport path in redraw() is purely
mechanical.  The viewport path looks broken to me in the presence of any
transform, but it is not this patch's job to fix it.

Screen-share fix just repeats the general code fix pattern, I did not even try
to understand that bit.

https://gitlab.freedesktop.org/wayland/weston/issues/99

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-02-27 11:08:48 +00:00
..
backend-drm backend-drm: stop direct accessing core struct member 2020-01-29 09:55:24 +00:00
backend-fbdev build: separate deps for int and ext libweston users 2019-10-24 13:29:33 +03:00
backend-headless Fix Wmaybe-uninitialized warnings 2020-01-28 12:30:56 +00:00
backend-rdp backend-rdp: unref keymap after associating with seat 2020-01-13 14:22:30 +00:00
backend-wayland build: separate deps for int and ext libweston users 2019-10-24 13:29:33 +03:00
backend-x11 backend-x11: need libdrm headers in build 2019-10-24 13:29:33 +03:00
renderer-gl gl-renderer: Move EGL display creation to egl-glue.c 2020-02-18 18:11:26 +13:00
animation.c libweston: add missing include 2020-01-29 09:49:41 +00:00
backend.h libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
bindings.c libweston: add missing include 2020-01-29 09:49:41 +00:00
clipboard.c libweston: add missing include 2020-01-29 09:49:41 +00:00
compositor.c Redefine output rotations 2020-02-27 11:08:48 +00:00
content-protection.c content-protection: stop direct accessing core struct member 2020-01-29 09:55:24 +00:00
data-device.c libweston: add missing include 2020-01-29 09:49:41 +00:00
dbus.c dbus: Don't return value from void function 2019-06-11 11:31:04 +01:00
dbus.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
git-version.h.meson Add Meson build system 2018-12-09 14:50:54 +02:00
input.c input: use ro_anonymous_file to minimize duplication of keymap files 2019-11-04 15:10:05 +01:00
launcher-direct.c libweston: make session_active a bool 2019-07-18 06:35:41 +00:00
launcher-impl.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-logind.c libweston: Move 'struct weston_backend' to the internal backend header 2019-07-18 06:43:38 +00:00
launcher-util.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-util.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
launcher-weston-launch.c launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
libinput-device.c libweston: Migrate functions that operate on 'weston_output' into backend header 2019-07-18 06:43:38 +00:00
libinput-device.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libinput-seat.c libweston: Remove internal weston-log set-up function out of public header 2019-07-18 13:34:04 +03:00
libinput-seat.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libweston-internal.h libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
linux-dmabuf.c libweston: Add the ability to determine if a dmabuf is scanout-capable 2019-11-21 13:54:50 +02:00
linux-dmabuf.h libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
linux-sync-file-uapi.h libweston: Introduce an internal linux sync file API 2019-02-06 12:21:56 +00:00
linux-sync-file.c libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
linux-sync-file.h libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
log.c libweston: add missing include 2020-01-29 09:49:41 +00:00
meson.build libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
noop-renderer.c libweston: add missing include 2020-01-29 09:49:41 +00:00
pixel-formats.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
pixel-formats.h pixel-formats: add RGBA bits and type fields 2019-10-04 12:17:18 +03:00
pixman-renderer.c renderer: change all frame_signal emission to pass previous_damage 2019-12-09 13:32:07 +01:00
pixman-renderer.h libweston: Introduce backend.h 2019-07-18 06:43:38 +00:00
plugin-registry.c Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
screenshooter.c screenshooter: get previous_damage from data argument instead of weston_output 2019-11-27 13:47:09 -03:00
spring-tool.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
timeline.c doc/sphinx: Add some documentation about timeline points 2019-10-17 21:42:25 +03:00
timeline.h doc/sphinx: Add some documentation about timeline points 2019-10-17 21:42:25 +03:00
touch-calibration.c libweston: add missing include 2020-01-29 09:49:41 +00:00
vertex-clipping.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
vertex-clipping.h Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-launch.c launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-launch.h launcher-weston-launch: avoid race condition when switching VT merge 2020-01-30 12:11:37 +00:00
weston-log-file.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-flight-rec.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log.c weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
zoom.c libweston: Add functions to modify disable_planes counter for an output 2019-08-26 16:18:22 +05:30