shell: Fix calculation of center point in surface rotation
Make sure the center point of a rotation is not rounded to an integer. It makes the calculation consistent with others in the shell. It also ensures surfaces rotated 180 degrees are at the exact same place.
This commit is contained in:
parent
a85118c1b8
commit
9a4f10f6bc
@ -2885,8 +2885,8 @@ surface_rotate(struct shell_surface *surface, struct weston_seat *seat)
|
||||
return;
|
||||
|
||||
weston_surface_to_global_float(surface->surface,
|
||||
surface->surface->geometry.width / 2,
|
||||
surface->surface->geometry.height / 2,
|
||||
surface->surface->geometry.width * 0.5f,
|
||||
surface->surface->geometry.height * 0.5f,
|
||||
&rotate->center.x, &rotate->center.y);
|
||||
|
||||
dx = wl_fixed_to_double(seat->pointer->x) - rotate->center.x;
|
||||
|
Loading…
x
Reference in New Issue
Block a user