[PATCH weston 18/18] shell: Fix calculation of center point in surface rotation

ppaalanen at gmail.com ppaalanen at gmail.com
Wed May 22 08:03:21 PDT 2013


From: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>

---
 src/shell.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index e46c30f..757d98d 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -3092,8 +3092,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;
-- 
1.8.1.5



More information about the wayland-devel mailing list