[Take 2][PATCH] Add touch support for wl_shell_surface_move

Rusty Lynch rusty.lynch at intel.com
Thu Aug 15 09:08:46 PDT 2013


On Thu, 2013-08-15 at 14:12 +0200, Jan Arne Petersen wrote:
> On 08/15/2013 12:49 AM, Rusty Lynch wrote:
> > From 3c68e0e2aa98250c65a5d5e9658299904ccf34f1 Mon Sep 17 00:00:00 2001
> > From: Rusty Lynch <rusty.lynch at intel.com>
> > Date: Wed, 14 Aug 2013 09:27:44 -0700
> > Subject: [PATCH] Add touch support for wl_shell_surface_move
> > 
> > ---
> >  clients/calibrator.c    |   4 +-
> >  clients/desktop-shell.c |   9 ++--
> >  clients/flower.c        |  11 +++++
> >  clients/fullscreen.c    |  12 +++++
> >  clients/simple-egl.c    |  50 +++++++++++++++++++
> >  clients/smoke.c         |   4 +-
> >  clients/transformed.c   |  12 +++++
> >  clients/window.c        |  52 +++++++++++++++-----
> >  clients/window.h        |  11 ++++-
> >  src/shell.c             | 128 +++++++++++++++++++++++++++++++++++++++++++++---
> >  10 files changed, 263 insertions(+), 30 deletions(-)
> 
<snip/>
> > +static void
> > +touch_move_grab_motion(struct weston_touch_grab *grab, uint32_t time,
> > +		       int touch_id, wl_fixed_t sx, wl_fixed_t sy)
> > +{
> > +	struct weston_touch_move_grab *move = (struct weston_touch_move_grab *) grab;
> > +	struct shell_surface *shsurf = move->base.shsurf;
> > +	struct weston_surface *es;
> > +	int dx = wl_fixed_to_int(sx + move->dx);
> > +	int dy = wl_fixed_to_int(sy + move->dy);
> 
> that should be global coordinates (touch->grab_x, touch->grab_y instead
> of sx an sy).

thanks

    --rusty




More information about the wayland-devel mailing list