[PATCH weston 4/5] compositor: fix weston_compositor_run_axis_binding() declaration

Pekka Paalanen ppaalanen at gmail.com
Mon Jun 4 07:49:14 PDT 2012


The parameter type of definition and declaration were different. The
compiler never noticed before, because wl_fixed_t was defined to be
int32_t.

Also adapt the calling site to the type-safe wl_fixed_t.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/compositor.c |    2 +-
 src/compositor.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 882e081..b548cf7 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1722,7 +1722,7 @@ notify_axis(struct wl_seat *seat, uint32_t time, uint32_t axis,
 
 	weston_compositor_activity(compositor);
 
-	if (value)
+	if (value.raw)
 		weston_compositor_run_axis_binding(compositor, ws, time, axis,
 						   value);
 	else
diff --git a/src/compositor.h b/src/compositor.h
index 21899d4..b615f11 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -585,7 +585,7 @@ weston_compositor_run_button_binding(struct weston_compositor *compositor,
 void
 weston_compositor_run_axis_binding(struct weston_compositor *compositor,
 				   struct weston_seat *seat, uint32_t time,
-				   uint32_t axis, int32_t value);
+				   uint32_t axis, wl_fixed_t value);
 
 int
 weston_environment_get_fd(const char *env);
-- 
1.7.3.4



More information about the wayland-devel mailing list