summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorGiulio Camuffo <giuliocamuffo@gmail.com>2016-03-22 17:44:54 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-23 14:05:09 +0200
commit90a6fc659f8a842f2460be2742f4e1359848f615 (patch)
treead96b18dc293d963ceacc511fede2d1cd473a3a0 /desktop-shell
parentfcf4b6c0aef3d2e3afda5fa8a4d4127585f7231b (diff)
input: use doubles in the interfaces to notify of input events
This patch is a further step in the wl_fixed_t internal sanitization. It changes the notify_* functions to take doubles instead of wl_fixed_t but does not change how these are stored in the various input structs yet, except for weston_pointer_axis_event. However this already allows to remove all wl_fixed_t usage in places like the libinput or the x11 backend. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index e1fefae1..24437d8d 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4786,7 +4786,7 @@ surface_opacity_binding(struct weston_pointer *pointer, uint32_t time,
if (!shsurf)
return;
- shsurf->view->alpha -= wl_fixed_to_double(event->value) * step;
+ shsurf->view->alpha -= event->value * step;
if (shsurf->view->alpha > 1.0)
shsurf->view->alpha = 1.0;
@@ -4799,7 +4799,7 @@ surface_opacity_binding(struct weston_pointer *pointer, uint32_t time,
static void
do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis,
- wl_fixed_t value)
+ double value)
{
struct weston_compositor *compositor = seat->compositor;
struct weston_pointer *pointer = weston_seat_get_pointer(seat);
@@ -4823,7 +4823,7 @@ do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis,
else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL)
/* For every pixel zoom 20th of a step */
increment = output->zoom.increment *
- -wl_fixed_to_double(value) / 20.0;
+ -value / 20.0;
else
increment = 0;