MacOS second monitor mouse bug (issue #419)

Started by Forestidia86, April 02, 2021, 05:18:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Forestidia86

Since I don't want to create a github account, some suggestions here to the (probably Allegro) bug (#419)

1) Filing an issue to Allegro, they should know best to find a fix if viable
2) Playing around with the values in the example, e.g. divide through 4, multiply with negative values etc.
3) Looking what values are shown if the cursor is within the window (maybe even create a video for that)
4) Using debug libraries to create log, which can be maybe helpful for issue at Allegro
5) Offering the workaround to switch off the mouse warping, maybe it's viable for Dominator

Forestidia86

#1
6) Trying having both monitors the same resolution. (Since Dominator found the readme remark about monitors with different resolutions.)

One of Dominators hunches seems to be that the cursor wants to jump to the promary monitor and only gets to the seam.

Possibly linked issues at Allegro (unsure):

al_get_monitor_info returns wrong values on Retina displays (earlier (closed) issues concerning resolution problems exist as well)
[5.0.7] al_get_window_position returns different values than expected (old, windows/probably not relevant)
Multi-Monitor Support (OSX) (closed,old)
ALLEGRO_MOUSE_STATE display property not set (closed,old)

Simon

Yep, linked between this LF thread and Dominator's Lix issue #419 on github.

Dominator has filed Allegro5 #1236: Issue with al_set_mouse_xy on secondary monitor (Mac), I'll watch how things develop.

-- Simon

Forestidia86

What I noticed in the source file qzmouse.m is that it contains "CGDirectDisplayID", which seems to give each monitor an identifier. Maybe there goes sth. wrong, but I can't assess that as a nonprogrammer.


Forestidia86

7) Positioning the screens above one another (in the displays-arrangement menu) and look if now it still jumps to the seam.

Forestidia86

#5
On this site seems to be listed most of the commands concerning CGDisplay, which seem to be used in the Allegro code as well.

8) On primary monitor, what happens if you put the window in one lower corner (if it wasn't already tried)?

Forestidia86

The documentation to CGMainDisplayID() talks about global display coordinate space and that the main display is the display with its screen location at (0,0).

But don't know if there go calculations wrong or how it was considered.