Repository navigation
Place Linux snips in each monitor's pixels - #11
Merged
Merged
Conversation
A 1x screen beside a 2x screen cannot share one scale. The new map crops a matching frame 1:1, including monitors at negative coordinates, and spreads any other frame uniformly across the desktop. Arrow keys move one desktop pixel.
A single overlay stretched mixed-DPI desktops. Each monitor now gets its own window, and drags that leave it use the X11 root pointer so the crop stays in desktop pixels.
XRRGetMonitors supplies the bounding box, including monitors left of or above (0, 0). The frame records that origin so the overlay crops 1:1. A rejected grab falls back to the root window.
PARITY.md lists each Windows feature and setting. The README notes per-monitor scale and X11 outputs outside the origin.
# Conflicts: # .github/workflows/build.yml # PARITY.md # README.md # linux/App.cs # linux/OverlayWindow.cs # linux/X11Pointer.cs # tests/OpenSnip.Tests/X11PointerTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Linux snips are placed in each monitor's pixels.
PARITY.mdlists every Windows feature and setting against this branch.Windows behavior is unchanged.
FandAstill select without completing, and Esc still cancels the whole snip.Why
A mixed-DPI desktop was the remaining gap in the Windows claim that a snip is the pixels you see. One scaled window cannot represent two scales at once.
How it was tested
DISPLAY=:1 dotnet test tests/OpenSnip.Tests/OpenSnip.Tests.csproj -c Release— 20 passed. The suite covers mixed-DPI mapping (a 1920×1080 DIP window on a 3840×2160 monitor), selection gestures, and a live X11 capture whose size and origin matchXRRGetMonitors.1920x1200+0+0. A drag from (180, 160) to (520, 460) saved a 341×301 PNG (inclusive edges). A click saved 1920×1200.Fthen Enter saved 1920×1200. Escape saved nothing.linux/AssemblyInfo.cs, the test project, and the Linuxdotnet teststep overlap the open X11 loader PR. Both add the sameInternalsVisibleTo.