rootston: damage tracking for rotated views

This commit is contained in:
emersion 2018-01-27 10:43:17 +01:00
parent a011a1cb07
commit 7111dd79ef
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 74 additions and 13 deletions

View file

@ -203,7 +203,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor,
float angle = atan2(vx*uy - vy*ux, vx*ux + vy*uy);
int steps = 12;
angle = round(angle/M_PI*steps) / (steps/M_PI);
view->rotation = cursor->view_rotation + angle;
view_rotate(view, cursor->view_rotation + angle);
}
break;
}