>realistically though - your app shouldnt have to really do this in general. the
>compositor itself likely should do this automatically. e.g. if you use a mouse
>device, show the cursor, then when you go idle for a while, hide it. not the
>policy you want on a pc, but the kind you'd want on a touch screen device or a
>tv with a remote that may sometimes have mice attached or used.

 

+1

 

As a maintainer of Tizen window system input, I strongly agree with Carsten Haitzler.

You can change the cursor image for your application when it's on your app window,

but you shouldn't try to hide it as the cursor is not the asset of an application but the system global resource.

 

I think it must be controlled by the compositor. The compositor controls the cursor visibility under the policy.

If you try to hide it and suppose it's hidden. I think there will be confusion for a user

as he doesn't understand why the cursor is not visible while the mouse is moving around.

 

Thanks.

Sung-Jin Park

 

--------- Original Message ---------

Sender : Carsten Haitzler (The Rasterman) <ti...@rasterman.com>

Date : 2016-12-20 09:58 (GMT+9)

Title : Re: [Dev] any API to hide the display of mouse cursor for app Window ?

 

On Mon, 19 Dec 2016 17:37:12 +0900 Ravindra Sande <r.sa...@samsung.com> said:

> Hi,
> 
> I am creating window for my native Tizen application using the
> ecore_wl_window_new() API.
> I need to hide the display of mouse cursor within the window.

first... use elm_win_*add(). ecore_evas is basically a low-level internal and
lots of things are not taken care of for you that the elementary window will do
instead. using elm's win means also your window is portable and will work in
wayland, x11, directly on the framebuffer (fbcon or drm/kms) etc.
"automatically". (environment variables will determine the default display
system to use, not code in your app). you will want all of this also for dnd,
copy & paste, client side decorations if needed and much more.

secondly... please look at sample code. i wrote a whole video player and mini
"media center" app:

https://git.enlightenment.org/apps/rage.git/

grab it. compile on your pc (with efl etc. there) and mess around with it.
it'll index ~/Videos/ if given no cmdline arguments otherwise pass in what you
want to play on the cmdline much like mplayer.

the point: it blanks the cursor. in win.c

https://git.enlightenment.org/apps/rage.git/tree/src/bin/win.c#n557

it creates a button, sets the color to 0 0 0 0 (invisible) and keeps it hidden.
when it wants to hide the mouse it shows event2 and since it is on top this
button controls the mousse cursor and the blank cursor is used...

realistically though - your app shouldnt have to really do this in general. the
compositor itself likely should do this automatically. e.g. if you use a mouse
device, show the cursor, then when you go idle for a while, hide it. not the
policy you want on a pc, but the kind you'd want on a touch screen device or a
tv with a remote that may sometimes have mice attached or used.

> Is there any API to do this ?
> 
> Regards,
> Ravindra Sande
> 
> _______________________________________________
> Dev mailing list
> Dev@lists.tizen.org
> https://lists.tizen.org/listinfo/dev
> 


-- 
Carsten Haitzler (The Rasterman) <ti...@rasterman.com>
_______________________________________________
Dev mailing list
Dev@lists.tizen.org
https://lists.tizen.org/listinfo/dev

 

 

_______________________________________________
Dev mailing list
Dev@lists.tizen.org
https://lists.tizen.org/listinfo/dev

Reply via email to