compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
This commit is contained in:
@@ -460,17 +460,6 @@ weston_surface_to_global_fixed(struct weston_surface *surface,
|
|||||||
*y = wl_fixed_from_double(yf);
|
*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
|
static void
|
||||||
surface_from_global_float(struct weston_surface *surface,
|
surface_from_global_float(struct weston_surface *surface,
|
||||||
GLfloat x, GLfloat y, GLfloat *sx, GLfloat *sy)
|
GLfloat x, GLfloat y, GLfloat *sx, GLfloat *sy)
|
||||||
|
|||||||
@@ -447,9 +447,6 @@ struct weston_surface {
|
|||||||
void
|
void
|
||||||
weston_surface_update_transform(struct weston_surface *surface);
|
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
|
void
|
||||||
weston_surface_to_global_fixed(struct weston_surface *surface,
|
weston_surface_to_global_fixed(struct weston_surface *surface,
|
||||||
wl_fixed_t sx, wl_fixed_t sy,
|
wl_fixed_t sx, wl_fixed_t sy,
|
||||||
|
|||||||
+6
-6
@@ -176,8 +176,8 @@ struct rotate_grab {
|
|||||||
struct shell_grab base;
|
struct shell_grab base;
|
||||||
struct weston_matrix rotation;
|
struct weston_matrix rotation;
|
||||||
struct {
|
struct {
|
||||||
int32_t x;
|
GLfloat x;
|
||||||
int32_t y;
|
GLfloat y;
|
||||||
} center;
|
} 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);
|
shell_grab_init(&rotate->base, &rotate_grab_interface, surface);
|
||||||
|
|
||||||
weston_surface_to_global(surface->surface,
|
weston_surface_to_global_float(surface->surface,
|
||||||
surface->surface->geometry.width / 2,
|
surface->surface->geometry.width / 2,
|
||||||
surface->surface->geometry.height / 2,
|
surface->surface->geometry.height / 2,
|
||||||
&rotate->center.x, &rotate->center.y);
|
&rotate->center.x, &rotate->center.y);
|
||||||
|
|
||||||
wl_pointer_start_grab(seat->pointer, &rotate->base.grab);
|
wl_pointer_start_grab(seat->pointer, &rotate->base.grab);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user