Mouse buggy on MacAranym

8 views
Skip to first unread message

Chris Ridd

unread,
Oct 8, 2023, 7:55:07 AM10/8/23
to ARAnyM
Hi,

I'm using Mac Aranym in a window using the mode:

[NFVDI]
UseHostMouseCursor = No

The grabbed mouse works pretty smoothly. However quite frequently the grabbed area seems to change from the entire host window to about three quarters the size. Or in other words the mouse cannot reach the far right or the far bottom of the Atari screen. Sometimes this fixes itself, but as you can imagine this is really annoying.

Do any other Mac users see this, and is there a configuration fix?

I did peek at the code a while back and found that Aranym's just calling some SDL2 methods to constrain the mouse to a rectangular area, however the SDL2 implementation on macOS was actually using some internal private Apple API for doing this instead of public API. Naughty! So I have suspicions this is an SDL bug, but honestly there are lots of moving parts and I can't say for sure without writing test code.

I've not seen this problem on other applications that also constrain the mouse in a window, like VMware or Parallels.

My Mac Aranym machine runs EmuTOS which run recent FreeMint distributions with fvdi. I'm pretty sure I started with one of the miniPacks from Francois. I *think* I've also seen this on an Aranym machine running MagiC as well, but can't be sure.

Any ideas?

Chris

Francois LE COAT

unread,
Oct 8, 2023, 11:20:49 AM10/8/23
to 'Christian Quante' via ARAnyM
Hi,
You're not precising your Mac type nor the version of your macOS system?
I never tested MacAranym with MacARM computers (Apple Silicon hardware).
So, I can't say what's happening with recent hardware and recent macOS.
Maybe you'll have an answer from Philipp Donzé, who is building ARAnyM,
and who is requiring feedback from his work, what I can't tell myself =)

--
François LE COAT
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
https://eureka.atari.org/

Chris Jenkins

unread,
Oct 8, 2023, 11:51:54 AM10/8/23
to Chris Ridd, ARAnyM
I never managed to make Aranym work satisfactorily with grabbed mouse on my Mac M1.

A while back, Thorsten suggested - in a forum thread - using GrabMouse = No and that’s what I use now. (At least, that’s what I think I use; I don’t have my Mac with me and won’t be able to check my Aranym config for some time). It works well enough for me that I don’t worry about the issue any more but sounds like it didn’t work for the other person who had the issue.

This was the forum thread: 

If you *do* want Aranym to grab the mouse then I found a combination of switching away from the Aranym window and then clicking back in it, as well as moving the mouse to all four corners of the window, to be the best workaround. Interested to hear if that works for you.

It sounds like you’ve got much further into the SDL sources than I did, though, and I’m still interested to learn if there is a better way to solve this issue with a grabbed mouse pointer.

Cheers,
Chris

--
You received this message because you are subscribed to the Google Groups "ARAnyM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aranym+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aranym/CALxLGgzGw6uRx58Rbx6_X42GMtneD3bt1tR5rDE7fYXEWScCbQ%40mail.gmail.com.

Chris Ridd

unread,
Oct 8, 2023, 2:13:07 PM10/8/23
to Francois LE COAT, 'Christian Quante' via ARAnyM
On Sun, 8 Oct 2023 at 16:20, Francois LE COAT <lec...@gmail.com> wrote: 
You're not precising your Mac type nor the version of your macOS system?
I never tested MacAranym with MacARM computers (Apple Silicon hardware).
So, I can't say what's happening with recent hardware and recent macOS.
Maybe you'll have an answer from Philipp Donzé, who is building ARAnyM,
and who is requiring feedback from his work, what I can't tell myself =)

Good points Francois.

I've only been able to run Mac Aranym on Apple Silicon hardware, and that means that I've only been able to use it on recent macOS releases - Big Sur (11), Monterey (12), Ventura (13), Sonoma (14).

Given these comments in src/video/cocoa/SDL_cocoawindow.m I am suspicious that Apple's changed something never meant to be exposed in newer OS releases. Using non-public API is a red flag.

@interface NSWindow (SDL)
#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 /* Added in the 10.10 SDK */
@property (readonly) NSRect contentLayoutRect;
#endif

/* This is available as of 10.13.2, but isn't in public headers */
@property (nonatomic) NSRect mouseConfinementRect;
@end

But this is absolutely just a hunch, and it'd be helpful to first check that we're calling the method with the correct sort of arguments at the expected times.

Chris

Chris Ridd

unread,
Oct 8, 2023, 2:17:52 PM10/8/23
to Chris Jenkins, ARAnyM
On Sun, 8 Oct 2023 at 16:51, Chris Jenkins <cdpje...@gmail.com> wrote:
I never managed to make Aranym work satisfactorily with grabbed mouse on my Mac M1.

That's helpful confirmation that I'm not missing some "everybody knows this" sort of secret!

A while back, Thorsten suggested - in a forum thread - using GrabMouse = No and that’s what I use now. (At least, that’s what I think I use; I don’t have my Mac with me and won’t be able to check my Aranym config for some time). It works well enough for me that I don’t worry about the issue any more but sounds like it didn’t work for the other person who had the issue.

That option proved too annoying, because sometimes the two cursors diverge and confuse the heck out of me :-)

Chris

Philipp Donzé

unread,
Oct 8, 2023, 4:11:23 PM10/8/23
to ARAnyM
Hi Chris

The grabbed mouse works pretty smoothly. However quite frequently the grabbed area seems to change from the entire host window to about three quarters the size. Or in other words the mouse cannot reach the far right or the far bottom of the Atari screen. Sometimes this fixes itself, but as you can imagine this is really annoying.

Do any other Mac users see this, and is there a configuration fix?

Yes, I’m aware of the problem and I think this is problem started when MacAranym had to be switched to SDL2 because SDL 1.2 was not supported anymore on any recent system.

I use the same workaround as suggested by Chris: 

moving the mouse to all four corners of the window, to be the best workaround.

I think the mouse grabbing mechanism in Aranym would have to be verified for SDL2 compatibility, as SDL2 introduced some changes on this should be done. But as most of the other platforms (Windows and Linux) are not using SDL2, this is not something which has been done so far.

One would have to dive deep into the aranym sources again, and try to use different approaches.
When I try to fix such bugs and fiddle with SDL2 (which is to me just another unknown library), I’m always a bit worried about the impact on all the other platforms… so for now, I have never tried to tackle this bug.

But I’m sure many MacAranym users would benefit if this would be finally fixed.

Philipp

Lonny Pursell

unread,
Oct 8, 2023, 4:33:09 PM10/8/23
to ARAnyM
I use mouse grab and yes I noticed this behavior. However, I prefer mouse grab and just live with it. ;)
I'm on an M2 mac. I found that it's not necessary to hit all four corners, simply move the mouse left to right beyond what it wants to go and do the same top to bottom and it corrects itself.


--
You received this message because you are subscribed to the Google Groups "ARAnyM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aranym+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aranym/CALxLGgzGw6uRx58Rbx6_X42GMtneD3bt1tR5rDE7fYXEWScCbQ%40mail.gmail.com.

-- 
Lonny Pursell                          http://gfabasic.net/

Francois LE COAT

unread,
Oct 22, 2023, 9:51:40 AM10/22/23
to ARAnyM
Hi Lonny,

Do you mean the ARAnyM miniPack is running "out of the box" when it is
depacked on your Mac? What is your macOS version? I am interested in
your feedback, because it wasn't confirmed so far, by any ATARIan...
I precise that I must use either iCab or SeaMonkey, to download it =)

Thanks,
Best regards,
Reply all
Reply to author
Forward
0 new messages