Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows bug: "select region" only works OK on primary monitor #2

Open
darkvertex opened this issue Jul 5, 2023 · 4 comments
Open

Comments

@darkvertex
Copy link

I suspect maybe it has something to do with the fact my Windows "Display Scaling" is set to 125% on my primary monitor and 150% on my secondary monitor. My second monitor is rotated sideways to look vertical, if it makes a difference.

@nathan-fiscaletti
Copy link
Owner

What exactly is happening? I'm assuming that it's not recording the specific region you've selected. I'm aware that using display scaling in general will normally cause an issue where the region you've selected won't be what's recorded. I'm still looking into a solution for display scaling.

@darkvertex
Copy link
Author

That's basically it, but I figured out another curious detail:

If you press the button to select the region, and drag the translucent window from the screen it appeared in to another screen with different display scaling %, the window "pops" briefly as it transitions between screens, looking correct.. but then when you Save, it's totally the wrong region. The part that it records is like the top right of that monitor for me, in a totally different place.

I tried moving the main window between monitors but the "region picker" always spawned on my "primary" monitor.

Perhaps if it spawned on the monitor the app window is in, maybe the scaling would be more correct?

@nathan-fiscaletti
Copy link
Owner

nathan-fiscaletti commented Jul 11, 2023

The issue is specifically caused by me not taking into account display scaling currently. Electron uses units that are scaled based on the display scaling factor. But gdigrab, the ffmpeg module we use to capture the screen on windows does not use display scaling.

However, accounting for this is difficult due to oddities in the way that Electron handles things. I believe that an issue with electron is making it difficult to support display scaling the way I'd like to. (Possibly this issue, I'm not certain: electron/electron#10862)

I'm still digging into it, but it might be some time before display scaling is fully supported.

@nathan-fiscaletti
Copy link
Owner

nathan-fiscaletti commented Sep 15, 2024

Given how long this underlying issue with Electron has remained unaddressed, I'm considering moving this project to an alternative like Lorca or Wails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants