[PATCH weston] input: make sure we repick the focus surface after the old one is destroyed

Giulio Camuffo giuliocamuffo at gmail.com
Tue Jul 9 14:30:59 PDT 2013


Ok, it's not a big deal.


2013/7/9 Kristian Høgsberg <hoegsberg at gmail.com>

> On Tue, Jul 09, 2013 at 02:21:24PM +0200, Giulio Camuffo wrote:
> > currently defult_grab_focus does not repick a surface if a mouse
> > button is pressed. change it so it does repick if there is no
> > current focus surface, like when the focus gets destroyed, so the
> > cursor does not disappear.
>
> Ah, yes, the disappearing is unfortunate, but also a regression.  We
> used to keep the cursor image even after the client died, so you would
> be stuck with the last cursor from the client until you release the
> mouse button.  The intended behavior is that we don't repick until all
> buttons are released, even when the focus goes away.  This is to avoid
> entering a surface with buttons down.  I don't have a good fix for
> this right now, but I prefer to keep the protocol semantics as they
> are and live with the cursor artifact for now.
>
> Kristian
>
> > ---
> >  src/input.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/input.c b/src/input.c
> > index a7a37e5..76ce81a 100644
> > --- a/src/input.c
> > +++ b/src/input.c
> > @@ -102,7 +102,7 @@ default_grab_focus(struct weston_pointer_grab *grab)
> >       struct weston_surface *surface;
> >       wl_fixed_t sx, sy;
> >
> > -     if (pointer->button_count > 0)
> > +     if (pointer->button_count > 0 && pointer->focus)
> >               return;
> >
> >       surface = weston_compositor_pick_surface(pointer->seat->compositor,
> > --
> > 1.8.3.2
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130709/6ecbbec1/attachment-0001.html>


More information about the wayland-devel mailing list