mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
rootston: damage views when moved
This commit is contained in:
parent
5089f2d9fb
commit
01bcc2ab01
7 changed files with 52 additions and 33 deletions
|
|
@ -90,17 +90,20 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
|||
|
||||
int width = wlr_surface->current->width;
|
||||
int height = wlr_surface->current->height;
|
||||
|
||||
if (view->pending_move_resize.update_x) {
|
||||
view->x = view->pending_move_resize.x +
|
||||
double x = view->pending_move_resize.x +
|
||||
view->pending_move_resize.width - width;
|
||||
view_update_position(view, x, view->y);
|
||||
view->pending_move_resize.update_x = false;
|
||||
}
|
||||
if (view->pending_move_resize.update_y) {
|
||||
view->y = view->pending_move_resize.y +
|
||||
double y = view->pending_move_resize.y +
|
||||
view->pending_move_resize.height - height;
|
||||
view_update_position(view, view->x, y);
|
||||
view->pending_move_resize.update_y = false;
|
||||
}
|
||||
|
||||
view_damage(view);
|
||||
}
|
||||
|
||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue