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

2015-12-09 Thread Vikas Patil
On Wed, Dec 9, 2015 at 7:45 PM, Pekka Paalanen  wrote:
> On Wed, 9 Dec 2015 18:50:38 +0530
> Vikas Patil  wrote:
>
>> On Wed, Dec 9, 2015 at 6:29 PM, Pekka Paalanen  wrote:
>> > On Wed, 9 Dec 2015 18:18:04 +0530
>> > Vikas Patil  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
diff -Naur git_old/src/client/qwaylandinputdevice.cpp git/src/client/qwaylandinputdevice.cpp
--- git_old/src/client/qwaylandinputdevice.cpp	2015-12-10 06:14:08.0 +
+++ git/src/client/qwaylandinputdevice.cpp	2015-12-10 06:17:57.0 +
@@ -381,10 +381,12 @@
 
 void QWaylandInputDevice::setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image)
 {
+static bool hide_cursor = qgetenv("QT_WAYLAND_HIDE_CURSOR").toInt();
+
 if (mCaps & WL_SEAT_CAPABILITY_POINTER) {
 mPointer->mCursorSerial = mPointer->mEnterSerial;
 /* Hide cursor */
-if (!buffer)
+if (!buffer || hide_cursor)
 {
 mPointer->set_cursor(mPointer->mEnterSerial, NULL, 0, 0);
 return;
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2015-12-09 Thread Peter Hutterer
On Wed, Dec 09, 2015 at 04:15:18PM +0200, Pekka Paalanen wrote:
> On Wed, 9 Dec 2015 18:50:38 +0530
> Vikas Patil  wrote:
> 
> > On Wed, Dec 9, 2015 at 6:29 PM, Pekka Paalanen  wrote:
> > > On Wed, 9 Dec 2015 18:18:04 +0530
> > > Vikas Patil  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


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2015-12-09 Thread Pekka Paalanen
On Wed, 9 Dec 2015 18:50:38 +0530
Vikas Patil  wrote:

> On Wed, Dec 9, 2015 at 6:29 PM, Pekka Paalanen  wrote:
> > On Wed, 9 Dec 2015 18:18:04 +0530
> > Vikas Patil  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?

> 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


pgpyT8awQ3fMn.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2015-12-09 Thread Vikas Patil
On Wed, Dec 9, 2015 at 6:29 PM, Pekka Paalanen  wrote:
> On Wed, 9 Dec 2015 18:18:04 +0530
> Vikas Patil  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
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.

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.

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

Regards,
Vikash
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2015-12-09 Thread Pekka Paalanen
On Wed, 9 Dec 2015 18:18:04 +0530
Vikas Patil  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.

All cursors are always set by clients, either applications or in
hmi-controller's case weston-ivi-shell-user-interface.

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


Thanks,
pq


pgpg3UD_8spkm.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


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

2015-12-09 Thread Vikas Patil
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?

** My weston.ini file for reference.Removing "cursor-theme" and
"cursor-size" doesn't help as it is used by hmi-controller adn I am
not using it.

[core]
shell=ivi-shell.so

[ivi-shell]
ivi-module=ivi-controller.so

cursor-theme=default
cursor-size=32

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

If I remove "ENV{ID_INPUT_MOUSE}="1"" from following line cursor is no
longer visible.

SUBSYSTEM=="input", ENV{ID_INPUT}="1", ENV{ID_INPUT_TOUCHSCREEN}="1",
ENV{ID_INPUT_MOUSE}="1", ENV{ID_INPUT_KEYBOARD}="1"



Thanks & Regards,
Vikas
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel