surface: better buffer position handling

This commit is contained in:
emersion 2018-06-25 22:38:40 +01:00
parent e6399c61b7
commit adf0423f7c
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 14 additions and 8 deletions

View file

@ -23,7 +23,7 @@ struct wlr_surface_state {
uint32_t committed; // enum wlr_surface_state_field
struct wl_resource *buffer;
int32_t sx, sy;
int32_t dx, dy; // relative to previous position
pixman_region32_t surface_damage, buffer_damage;
pixman_region32_t opaque, input;
enum wl_output_transform transform;
@ -32,6 +32,7 @@ struct wlr_surface_state {
int width, height; // in surface-local coordinates
int buffer_width, buffer_height;
int sx, sy; // in surface-local coordinates
struct wl_listener buffer_destroy_listener;
};