App.cursor behaviour

M;acOS, and Xojo 2021 r1
As example I created a desktop:
https://www.dropbox.com/s/l1uos14fu6ldrub/App%20cursor.xojo_binary_project.zip?dl=0

A button allow to change the App.cursor to the finger cursor, then with this cursor
another button opens a Floating Window

Then, the app cursor is reset by Xojo or MacOS, is this normal or is a bug?

image

If moving the cursor over the floating window then the cursor recover its finger image, but when enter the original window reset again to standard cursor.

The Finger Button:

Sub Action() Handles Action
  App.MouseCursor = System.Cursors.FingerPointer
End Sub

The Open Floating window (forcet to open to the right of the cursor to see the effect):

Sub Action() Handles Action
  Window2.Left = system.MouseX+10
  window2.Show
  
End Sub

Really interesting. Switching focus back to the main window, the finger pointer cursor is not displayed unless I hover over the buttons. If I move the mouse off of them, it goes back to the standard pointer.

I switched to setting the Window.MouseCursor property in the Open event, and that issue is fixed, but the FingerPointer is still only displayed on the main window when it has focus.

The same example, if using a Document window not a floating, then when the cursor is over the active window the finger cursor is showed, but when over the non active window cursor is reset to standard one.

It works fine here. I do not understand the trouble.

The cursor change when it is above the title part of the window. It stays as Finger when the floating window is above. And change to arrow when goes out of the floating.

For me, standard behavior.

Look at the cursor in the IDE when moving from above the Code Editor with focus, then above the Properties or Navigation panes or elsewhere.

Just so you know, I was discussing with another developer (who uses a different tool to Xojo, but is still a macOS developer) about problems with cursors in recent macOS versions. He’s aware of some bugs at the OS level and was describing issues I’ve seen from within Xojo (and when I try to force a cursor using system API).

1 Like

Running El Capitan at test time here.

The more recent version you use, the more bugs you’ll encounter :wink:

1 Like

He reads this while WindowServer and TouchBarServer are once again fighting to take over my CPU and then I realize I haven’t rebooted yet today.

1 Like

Even Windows never had to be restarted daily (as few as I’ve used it)… :wink:

B.l.o.o.d.y BS has kernel panics for rebooting. Under Monterey the computer just gets black.

1 Like

Back in 2005, my wife had a Sony Vaio and it needed to be restarted daily otherwise Adobe Illustrator couldn’t save. She lost a lot of work when she forgot.

It can’t be each time, of course. How frequent?

Once every 7-10 days or so. And yes, it can be each time.

But hey, we can now get Proxy Icons in the window titlebars back in Monterey!

How great…

They were absent of 10.16?
It’s now the moment I realise I’ve skipped an entire macOS release cycle (well, I’ve probably used Big Sur twice, for a total of… 10 minutes :sweat_smile:).

1 Like