From 760d60f508330a11a64021a096cac46e8732ebd2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 12 Jul 2023 10:12:42 +0100 Subject: [PATCH] desktop-shell: Remove unnecessary repaint schedules We don't need to explicitly schedule a repaint once we've reconfigured some views. Signed-off-by: Daniel Stone --- desktop-shell/shell.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index d302340b..f90c92d0 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1023,19 +1023,14 @@ touch_move_grab_motion(struct weston_touch_grab *grab, { struct weston_touch_move_grab *move = (struct weston_touch_move_grab *) grab; struct shell_surface *shsurf = move->base.shsurf; - struct weston_surface *es; struct weston_coord_global pos; if (!shsurf || !shsurf->desktop_surface || !move->active) return; - es = weston_desktop_surface_get_surface(shsurf->desktop_surface); - pos = weston_coord_global_add(grab->touch->grab_pos, move->delta); pos.c = weston_coord_truncate(pos.c); weston_view_set_position(shsurf->view, pos); - - weston_compositor_schedule_repaint(es->compositor); } static void @@ -1156,7 +1151,6 @@ move_grab_motion(struct weston_pointer_grab *grab, struct weston_move_grab *move = (struct weston_move_grab *) grab; struct weston_pointer *pointer = grab->pointer; struct shell_surface *shsurf = move->base.shsurf; - struct weston_surface *surface; struct weston_coord_global pos; int cx, cy; @@ -1164,14 +1158,10 @@ move_grab_motion(struct weston_pointer_grab *grab, if (!shsurf || !shsurf->desktop_surface) return; - surface = weston_desktop_surface_get_surface(shsurf->desktop_surface); - constrain_position(move, &cx, &cy); pos.c = weston_coord(cx, cy); weston_view_set_position(shsurf->view, pos); - - weston_compositor_schedule_repaint(surface->compositor); } static void @@ -1289,18 +1279,15 @@ tablet_tool_move_grab_motion(struct weston_tablet_tool_grab *grab, struct weston_tablet_tool_move_grab *move = (struct weston_tablet_tool_move_grab *)grab; struct shell_surface *shsurf = move->base.shsurf; - struct weston_surface *es; weston_tablet_tool_cursor_move(grab->tool, pos); if (!shsurf) return; - es = weston_desktop_surface_get_surface(shsurf->desktop_surface); pos.c.x += wl_fixed_to_double(move->dx); pos.c.y += wl_fixed_to_double(move->dy); weston_view_set_position(shsurf->view, pos); - weston_compositor_schedule_repaint(es->compositor); } static void @@ -3361,7 +3348,6 @@ set_tiled_orientation(struct weston_surface *focus, weston_view_set_position(shsurf->view, pos); weston_desktop_surface_set_size(shsurf->desktop_surface, width, height); weston_desktop_surface_set_orientation(shsurf->desktop_surface, orientation); - weston_compositor_schedule_repaint(surface->compositor); } static void