jasonjmcghee / rem

An open source approach to locally record and enable searching everything you view on your Mac.
https://rem.ing
MIT License
2.18k stars 60 forks source link

Display ID: 1 when second monitor in fullscreen mode #91

Closed cparish312 closed 1 month ago

cparish312 commented 1 month ago

The display id is 1 and the main monitor screen is captured when the external monitor is in fullscreen. The Active Application is still the correct application.

jasonjmcghee commented 1 month ago

Clearly I'm dense- can you attempt to explain the issue a second time / ramifications of the above?

cparish312 commented 1 month ago

Haha yeah no worries!

The main result of the bug is when a external monitor is in full screen mode, the contents of that monitor will not be captured even if the active application is the one on the monitor. The below screenshot is the result of fullscreening the firefox window on the external monitor. The Active Application is still firefox, but the display id being recorded is now 1 (which is the main monitor). Leaving fullscreen immediately fixes the isssue. Screenshot 2024-04-29 at 2 17 56 PM

cparish312 commented 1 month ago

It seems like this is due to a strange behavior of NSScreen.main?.

I'm thinking a robust solution would be to just take the display that the users mouse is currently on. I believe that is rewind's approach.