diff --git a/src/compositor.c b/src/compositor.c index 47da8183..623dff31 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -4003,6 +4003,8 @@ weston_output_update_matrix(struct weston_output *output) output->current_scale, 1); output->dirty = 0; + + weston_matrix_invert(&output->inverse_matrix, &output->matrix); } static void diff --git a/src/compositor.h b/src/compositor.h index 24ed4fc0..be323123 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -185,6 +185,8 @@ struct weston_output { /** From global to output buffer coordinates. */ struct weston_matrix matrix; + /** From output buffer to global coordinates. */ + struct weston_matrix inverse_matrix; struct wl_list animation_list; int32_t x, y, width, height;