Hide mouse pointer when running on a desktop

641 views
Skip to first unread message

stas.zy...@gmail.com

unread,
Mar 8, 2014, 8:37:40 AM3/8/14
to kivy-...@googlegroups.com
Hi, I'm developing fullscreen kivy applications for a GNU/Linux based all-in-one desktop system with a touchscreen (MSI AE2051, AE201 etc)
The problem I have is that the mouse pointer is alway visible.
Is there a kivy way to hide it ? 
Or is it something that is handled at OS/desktop level ?

Thanks,
Stas

http://www.braintrainerplus.com

Alexander Taylor

unread,
Mar 8, 2014, 10:03:34 AM3/8/14
to kivy-...@googlegroups.com
There is a kivy config option for this, you can see it in the settings panel if you press f1. I think it is the 'show_cursor' option in the [graphics] section, and you can use that information to set it manually.

stas.zy...@gmail.com

unread,
Mar 8, 2014, 11:35:53 AM3/8/14
to kivy-...@googlegroups.com

I've read the Config API doc but somehow I've missed it :-(
Thank you.

stas.zy...@gmail.com

unread,
Mar 9, 2014, 11:13:38 AM3/9/14
to kivy-...@googlegroups.com
It will hide the mouse cursor indeed, but there's a manor problem......
Then the touchscreen stopped working also ?!

Is there a way to alter the mouse cursor so that we can set it to one pixel or whatever ?
Kivy seems to draw it's own cursor because changes to the cursor made in the desktop don't have any effect when the cursor enters the Kivy window. 

Marco Ma

unread,
Aug 24, 2014, 1:20:00 AM8/24/14
to kivy-...@googlegroups.com
i met the same problem!

hide mouse via xlib not function in kivy env....

close "show_cursor" option in kivy config case touchscreen not work.....

Stas Zytkiewicz

unread,
Aug 24, 2014, 1:34:33 AM8/24/14
to kivy-...@googlegroups.com

Is there perhaps a way to replace the cursor for a all transparent image?
That way we keep touchscreen functionality but no visible cursor.

Can one of the kivy devs look into this issue,  or gives us some pointers to a possible solution, this issue keeps us from using kivy in our products :-(

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/BtOU_J4GPvQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Ma

unread,
Aug 24, 2014, 9:03:33 AM8/24/14
to kivy-...@googlegroups.com, stas.zy...@gmail.com
ahaha!!

GOT IT!!!!!!!! 

cursor = pygame.cursors.load_xbm('cache/mouse1.xbm', 'cache/mouse2.xbm')
pygame.mouse.set_cursor(*cursor)

mouseXX.xbm is a 8x8 xbm file created by GIMP, with transparent backgroud!! it works!!!!!!!!!!!!!

Stas

unread,
Aug 24, 2014, 9:08:33 AM8/24/14
to Marco Ma, kivy-...@googlegroups.com
Cool, marco, nice work :-)
I'm going to try it also.
This is why free-software is superior :-)
Regards,
Stas Zytkiewicz

Stas Zytkiewicz

unread,
Aug 24, 2014, 10:34:57 AM8/24/14
to Marco Ma, kivy-...@googlegroups.com
On 24-08-14 15:08, Stas wrote:
> Cool, marco, nice work :-)
> I'm going to try it also.
> This is why free-software is superior :-)

Yep, confirmed.
The solution Macro found will fix this issue on "PC touchscreens"
like the MSI AE* family.

> On August 24, 2014 3:03:32 PM CEST, Marco Ma <chopi...@gmail.com> wrote:
>> ahaha!!
>>
>> GOT IT!!!!!!!!
>>
>> cursor = pygame.cursors.load_xbm('cache/mouse1.xbm',
>> 'cache/mouse2.xbm')
>> pygame.mouse.set_cursor(*cursor)
>>
>> mouseXX.xbm is a 8x8 xbm file created by GIMP, with transparent
>> backgroud!!
>> it works!!!!!!!!!!!!!
>>
>>
>>
>> On Sunday, August 24, 2014 1:34:33 PM UTC+8, Stas Zytkiewicz wrote:
>>>
>>> Is there perhaps a way to replace the cursor for a all transparent
>> image?
>>> That way we keep touchscreen functionality but no visible cursor.
>>>
>>> Can one of the kivy devs look into this issue, or gives us some
>> pointers
>>> to a possible solution, this issue keeps us from using kivy in our
>> products
>>> :-(
>>> On Aug 24, 2014 7:20 AM, "Marco Ma" <chopi...@gmail.com
>> <javascript:>>
>>>> kivy-users+...@googlegroups.com <javascript:>.

Marco Ma

unread,
Aug 24, 2014, 11:21:40 PM8/24/14
to kivy-...@googlegroups.com, chopi...@gmail.com
True, my touchscreen is Acer (Advanced Silicon S.A. by lsusb)

stas.zy...@gmail.com

unread,
Jun 17, 2015, 9:36:20 AM6/17/15
to kivy-...@googlegroups.com
It seems this solution stopped working with Kivy 1.9 ?!
The cursor is drawn regardless which image you load.
Reply all
Reply to author
Forward
0 new messages