summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-cursor.c
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2019-07-02 12:03:12 +0200
committerHans de Goede <hdegoede@redhat.com>2019-10-12 12:19:14 +0200
commit7c6f17790d3aedb164481264b0f05a8a14103731 (patch)
tree885e048f063f4ad5882a802ab1cbd686f44cad80 /hw/xwayland/xwayland-cursor.c
parent47bba4625339592d08b375bcd8e51029c0000850 (diff)
xwayland: Use buffer_damage instead of surface damage if available
When a viewport is set, damage will only work properly when using wl_surface_damage_buffer instead of wl_surface_damage. When no viewport is set, there should be no difference between surface and buffer damage. This is a preparation patch for using viewport to add support for fake mode-changes through xrandr for apps which want to change the resolution when going fullscreen. Changes by Hans de Goede <hdegoede@redhat.com>: -Split the damage changes out into their own patch -Add xwl_surface_damage helper -Also use buffer_damage / the new helper for the present and cursor code Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'hw/xwayland/xwayland-cursor.c')
-rw-r--r--hw/xwayland/xwayland-cursor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index ec0029438..6c73553bd 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -166,9 +166,9 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat)
xwl_seat->x_cursor->bits->yhot);
wl_surface_attach(xwl_cursor->surface,
xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0);
- wl_surface_damage(xwl_cursor->surface, 0, 0,
- xwl_seat->x_cursor->bits->width,
- xwl_seat->x_cursor->bits->height);
+ xwl_surface_damage(xwl_seat->xwl_screen, xwl_cursor->surface, 0, 0,
+ xwl_seat->x_cursor->bits->width,
+ xwl_seat->x_cursor->bits->height);
xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface);
wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor);
@@ -218,9 +218,9 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool)
xwl_seat->x_cursor->bits->yhot);
wl_surface_attach(xwl_cursor->surface,
xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0);
- wl_surface_damage(xwl_cursor->surface, 0, 0,
- xwl_seat->x_cursor->bits->width,
- xwl_seat->x_cursor->bits->height);
+ xwl_surface_damage(xwl_seat->xwl_screen, xwl_cursor->surface, 0, 0,
+ xwl_seat->x_cursor->bits->width,
+ xwl_seat->x_cursor->bits->height);
xwl_cursor->frame_cb = wl_surface_frame(xwl_cursor->surface);
wl_callback_add_listener(xwl_cursor->frame_cb, &frame_listener, xwl_cursor);