Skip to content

win-capture: Use DIP pixels for window capture#42

Open
SuslikV wants to merge 3 commits intopatch-10from
patch-10-wnd
Open

win-capture: Use DIP pixels for window capture#42
SuslikV wants to merge 3 commits intopatch-10from
patch-10-wnd

Conversation

@SuslikV
Copy link
Copy Markdown
Owner

@SuslikV SuslikV commented Aug 28, 2018

Sets captured window size according to the current reported DPI setting
and adjusts cursor position.

For example, when system display scale set to 125%, the captured window
may has black bars at bottom and right under the Win10. Cursor position
always based on physical pixels, thus cursor position in the capture
becomes misaligned to the window.
This removes the black bars from the capture and recalculates cursor
position to align it to the window.

Set captured window size according to current reported DPI setting.

For example, when system display scale set to 125%, only reported
metric is adjusted, so the captured window has black bars at bottom
and right.
This removes the black bars from the capture.
Adjusts cursor position according to current reported DPI setting.

Cursor position always based on physical pixels. So, if system display
scale set, for example, to 125% - cursor position in the capture
becomes misaligned to the window.
This recalculates cursor position to align it to the window.
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

Successfully merging this pull request may close these issues.

1 participant