How to hide mouse cursor with weston and ivi-shell?

Vikas Patil vikasmpatil at gmail.com
Wed Dec 9 22:42:20 PST 2015


On Wed, Dec 9, 2015 at 7:45 PM, Pekka Paalanen <ppaalanen at gmail.com> 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?
>

To avoid any changes in input stack, we intend to use the standard
pointer support available with rotatry knob exposing event from it as
REL_WHEEL. GENIVI wayland-ivi-extension has input apis to set the
focus to specific surface with specific input device. (see:
http://wiki.projects.genivi.org/index.php/Getting_Started_with_new_Input_Handling_APIs
)

>> 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.
>

As we are using qtwayland, I found a way to disable it. I tried
disabling it using the environment variable with QT and it is working.
Attached here the patch for reference.

>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hide_cursor_support_qtwayland_5_4_2.patch
Type: text/x-patch
Size: 747 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151210/aea1e21a/attachment.bin>


More information about the wayland-devel mailing list