diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-07 20:10:23 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-06-07 20:10:23 -0400 |
commit | b2af93ef8cefb802c8bf1ba98c6196f9886fcbe8 (patch) | |
tree | 4b684c6a63811b394232b8dcabf1f465e7c526b2 | |
parent | 9a050afc0611887cb6bc131427f2127d43833f9b (diff) |
compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
-rw-r--r-- | src/compositor.c | 11 | ||||
-rw-r--r-- | src/compositor.h | 3 | ||||
-rw-r--r-- | src/shell.c | 12 |
3 files changed, 6 insertions, 20 deletions
diff --git a/src/compositor.c b/src/compositor.c index 220fefb..ac39fe9 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -460,17 +460,6 @@ weston_surface_to_global_fixed(struct weston_surface *surface, *y = wl_fixed_from_double(yf); } -WL_EXPORT void -weston_surface_to_global(struct weston_surface *surface, - int32_t sx, int32_t sy, int32_t *x, int32_t *y) -{ - GLfloat xf, yf; - - weston_surface_to_global_float(surface, sx, sy, &xf, &yf); - *x = floorf(xf); - *y = floorf(yf); -} - static void surface_from_global_float(struct weston_surface *surface, GLfloat x, GLfloat y, GLfloat *sx, GLfloat *sy) diff --git a/src/compositor.h b/src/compositor.h index 2d52048..646e1e7 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -448,9 +448,6 @@ void weston_surface_update_transform(struct weston_surface *surface); void -weston_surface_to_global(struct weston_surface *surface, - int32_t sx, int32_t sy, int32_t *x, int32_t *y); -void weston_surface_to_global_fixed(struct weston_surface *surface, wl_fixed_t sx, wl_fixed_t sy, wl_fixed_t *x, wl_fixed_t *y); diff --git a/src/shell.c b/src/shell.c index 25a9677..879433c 100644 --- a/src/shell.c +++ b/src/shell.c @@ -176,8 +176,8 @@ struct rotate_grab { struct shell_grab base; struct weston_matrix rotation; struct { - int32_t x; - int32_t y; + GLfloat x; + GLfloat y; } center; }; @@ -1896,10 +1896,10 @@ rotate_binding(struct wl_seat *seat, uint32_t time, uint32_t button, shell_grab_init(&rotate->base, &rotate_grab_interface, surface); - weston_surface_to_global(surface->surface, - surface->surface->geometry.width / 2, - surface->surface->geometry.height / 2, - &rotate->center.x, &rotate->center.y); + weston_surface_to_global_float(surface->surface, + surface->surface->geometry.width / 2, + surface->surface->geometry.height / 2, + &rotate->center.x, &rotate->center.y); wl_pointer_start_grab(seat->pointer, &rotate->base.grab); |