From 259420dde1f45723c2fd6bfd2d1dbc9d7c7d202b Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 12 Jul 2023 10:10:27 +0100 Subject: [PATCH] view: Schedule view repaint when changing properties Whenever a view is moved, we should schedule a repaint for the outputs the view is on. This avoids users having to do it by hand every time they change something. There is no change in determinism of behaviour (e.g. 'I can reconfigure views as often as I like and it won't take effect until I schedule a repaint' isn't true, because output repaints might happen for reasons outside your control). Signed-off-by: Daniel Stone --- libweston/compositor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index c5bc19053..681209397 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -1695,6 +1695,8 @@ weston_view_geometry_dirty_internal(struct weston_view *view) weston_view_geometry_dirty_internal(child); weston_view_dirty_paint_nodes(view); + + weston_view_schedule_repaint(view); } WL_EXPORT void @@ -1950,7 +1952,6 @@ weston_view_set_mask(struct weston_view *view, pixman_region32_init_rect(&view->geometry.scissor, x, y, width, height); view->geometry.scissor_enabled = true; weston_view_geometry_dirty(view); - weston_view_schedule_repaint(view); } /** Remove the clip mask from a view @@ -1966,7 +1967,6 @@ weston_view_set_mask_infinite(struct weston_view *view) { view->geometry.scissor_enabled = false; weston_view_geometry_dirty(view); - weston_view_schedule_repaint(view); } /* Check if view should be displayed