DesktopCanvas.MouseCursor not changing unless I move it

Hello everyone

I’m doing dev on Xojo 2024 r4.2 on Linux Mint Cinnamon.
I found that if I try to do the following code in a keydown event:

Canvas1.MouseCursor = System.Cursors.HandOpen

the change doesn’t happen unless I move the mouse.
The same happens if I restore the mouse to Nil, unless I move the mouse it’s not happening.

It’s not the end of the world by any means, but I think is not the way it should behave. On Windows the mouse is changed immediately.

Can anyone comment on this?
Thanks a lot.

the docs says:
The cursor to be displayed while the mouse is within the control and both the DesktopApplication and Window class’s MouseCursor properties are Nil.

If the DesktopApplication class’s MouseCursor property is not Nil or the Window’s MouseCursor property is not Nil, then any control’s MouseCursor property is ignored.

So, I would set DeskTopApplication and Window MouseCursor to Nil, then cg-hange the cursor.

Clearly I forgot to mention that on Windows it behaves as expected, sorry about that :slight_smile:

Canvas.Keydown:
if key = " " then
if app.MouseCursor = Nil and Window1.MouseCursor = Nil then
me.MouseCursor = System.Cursors.HandOpen
end if
end if

Both app.MouseCursor = Nil and Window1.MouseCursor = Nil when I try to change the mouse pointer.
I think is a bug.

File an issue (bug report).

Hmmm… You did mention it :thinking:

1 Like

I did hahhahah too much mustitasking :sweat_smile: