How to hide mouse cursor with weston and ivi-shell?
Peter Hutterer
peter.hutterer at who-t.net
Wed Dec 9 14:21:18 PST 2015
On Wed, Dec 09, 2015 at 04:15:18PM +0200, Pekka Paalanen wrote:
> On Wed, 9 Dec 2015 18:50:38 +0530
> Vikas Patil <vikasmpatil at gmail.com> wrote:
>
> > On Wed, Dec 9, 2015 at 6:29 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > > On Wed, 9 Dec 2015 18:18:04 +0530
> > > Vikas Patil <vikasmpatil at gmail.com> wrote:
> > >
> > >> Dear All,
> > >>
> > >> I would like to have the mouse pointer support available with weston
> > >> and ivi-shell (with ivi-controller.so) but want to hide the cursor
> > >> which is always visible.
> > >>
> > >> Is there any easy way I can do this? Any ideas/suggestions?
> > >
> > > Hi,
> > >
> > > what is your use case? There are several answers depending on what you
> > > are doing and what kind of applications you are running.
> >
> > Thanks for your quick reply.
> >
> > I need mouse pointer support as rotary knob hard key on our platform
> > on GPIO added as standard mouse wheel support. I also required mouse
>
> Hi,
>
> I'll defer to Peter whether that device should be a pointer device or
> something completely different. I would guess something different...
>
> How do you decide which client or surface should receive the rotary
> knob events?
depends: there are some devices that have a specific scroll wheel but no
axes, e.g. some keyboards have that. Those devices are a pointer device (and
a keyboard device). A rotary knob with no other specific function should be
a buttonset devices and handled case-per-case by the compositor, but we
don't have the buttonset interface yet.
so far in all the use-cases we've had at least one other normal pointer
device, so selecting a surface wasn't a problem.
Cheers,
Peter
> > pointer support for the platform configuration which doesn't has touch
> > support so mouse can be used for development. If I know how to just
> > hide the cursor, probably I will try to do it via weston.ini config so
> > when required visibility of cursor can be enabled/disabled.
>
> Weston automatically creates and destroys the pointer capability and
> the cursor with it whether there is a pointer device connected or not.
>
> Forcing the cursor to not show would require hacking Weston core. I
> can't help but think that this would be a poor bandaid for the
> underlying problem.
>
> > I have application Qt/Qtwayland based HMI on top of weston and ivi-shell.
> >
> > > All cursors are always set by clients, either applications or in
> > > hmi-controller's case weston-ivi-shell-user-interface.
> >
> > I am not making use of hmi-controller and hence
> > weston-ivi-shell-user-interface. I am using ilm apis directly with
> > ivi-controller.so.
>
> That does not change the fact, that the client whose surface the
> pointer is on, is responsible for setting (or hiding) the cursor, when
> a pointer device exists. wl_pointer.set_cursor is part of Wayland core
> protocol and is implemented in Weston core. There are no configuration
> options or API to keep the cursor hidden unless you remove the whole
> pointer device...
>
> Hm, I suppose you could try restacking the cursor_layer behind
> everything else. That would be possible to do in ivi-shell, but I still
> don't think it would be upstreamable.
>
> > >> ** I can hide if I disable the MOUSE capability via udev custom rule
> > >> but I don't want to remove the pointer support as it is required. Just
> > >> want to hide the pointer drawing.
> > >
> > > How does pointer support without a cursor make any sense?
> > > You would be poking blind with the mouse, so there is no ready-made
> > > option to do that.
>
> It turns out your pointer device is not a pointer device and that
> causes problems. I'm not surprised.
>
>
> Thanks,
> pq
More information about the wayland-devel
mailing list