I fixed it by using the form's cursor property instead of the screen's cursor.
Thanks, to evaluate your suggestion I did some tests.
My primary one (I should have posted it before) is this (just a button on the form, when I pressed it, the event handler)
procedure TForm1.Button1Click(Sender: TObject);
begin
Screen.Cursor:=crHourGlass;
try
Sleep(10000);
finally
Screen.Cursor:=crDefault;
end;
end;
This test works as expected on Windows/Delphi and Windows/Lazarus. So the cursor is instantly the busy one and for the following 10 seconds I can hover over the form and the button and see no other active cursor.
This test also reveals the issue of my original post (no busy cursor with Linux, Lazarus 2.2.2, fpc 3.2.2, gtk2 (version 2.24.33-7.el9)), VirtualBox machine (another guess as of time of this writing is that the problem might arise with cursor integration when dealing with virtual guests)
When I switch the cursor assignment to Cursor:=... instead of Screen.Cursor:= (so effectively using your suggestion) I see no expected behavior on all three tests (Windows and Linux), no busy cursor while hovering over both the form and the button. So probably your circumstances are little different from the ones with my test. Can you reproduce the expected cursor working with this simple test on your configuration?