[weston,1/3] libweston: Preserve initial mouse pointer placement

Submitted by Marie Stephanie Alesna on Oct. 9, 2017, 10:12 p.m.

Details

Message ID 20171009221234.18237-1-istephielicious@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Marie Stephanie Alesna Oct. 9, 2017, 10:12 p.m.
Formerly mouse pointer always moved to the top left corner as both prev_x and
prev_y were set to NaN.

Signed-off-by: Marie Stephanie Alesna <istephielicious@gmail.com>
---
 libweston/compositor.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libweston/compositor.c b/libweston/compositor.c
index 71a9b38c..5f287c17 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -4582,6 +4582,8 @@  weston_output_transform_coordinate(struct weston_output *output,
 		0.0,
 		1.0 } };
 
+	if (output->dirty)
+		weston_output_update_matrix(output);
 	weston_matrix_transform(&output->inverse_matrix, &p);
 
 	*x = p.f[0] / p.f[3];