Hiding mouse

Good afternoon (o;

Have a touchscreen application here on Linux which runs in full screen mode.

So to disable the mouse pointer I use this snippet in the Windows Activated and Opening event:

Self.MouseCursor = System.Cursors.InvisibleCursor

But the mouse pointer is still visible on startup until I do a first touch, then it disappears…
So how would I prevent this initial display of the mouse pointer?

thanks in advance
richard

What about doing it in the app’s Opening event?

Same effect…

Mouse pointer is shown after startup until a first touch is done.

I’ve opened an issue, that is about this same thing.

Sign on here:
https://tracker.xojo.com/xojoinc/xojo/-/issues/77743

Have you test this Methods?

System.Cursors.Hide
System.Cursors.Show

Same effect…

if on Linux, install unclutter then run it somewhere on login:

unclutter -idle 0

Mouse pointer still shows when dragging…

Seems this works best for now on Raspberry Pi:

sudo sed -i -- "s/#xserver-command=X/xserver-command=X -nocursor/" /etc/lightdm/lightdm.conf

1 Like

This may not work for wayland, a fix should be coming in the next xojo release for this.

Can’t use Wayland as then touchscreen won’t work with custom controls…

Is xojo working on a fix for this ? (is there an issue created?)

Yes…I created one: https://tracker.xojo.com/xojoinc/xojo/-/issues/77347

But last answer was to use X11 as a workaround…as my deadline for a demo project is end of this November.