Commit 764d9cf329b641a2da4924235ac2d719ba8b3b35 Parent: 178ff3e9466340dbbba8b9585f29f7eb8ae77294 Author: mcol <mcol@posteo.net> Date: 2021-02-12 10:46:27 +0000 Committer: mcol <mcol@posteo.net> Committed: 2021-02-12 10:46:27 +0000 damage only necessary boxes when moving window
src/action.c Modified
@@ -63,9 +63,28 @@ return; } } + struct wlr_box damage = { + .x = view->x, + .y = view->y, + .width = view->surface->geometry.width, + .height = view->surface->geometry.height, + }; struct motion motion = *(struct motion*)data; + if (motion.dx > 0) { + damage.width += motion.dx; + } else { + damage.x -= motion.dx; + damage.width -= motion.dx; + } + if (motion.dy > 0) { + damage.height += motion.dy; + } else { + damage.y -= motion.dy; + damage.height -= motion.dy; + } view->x += motion.dx; view->y += motion.dy; + damage_box(&damage, true); }