Closed davisrichard437 closed 1 week ago
That's very interesting! For context about how gscreenshot does region selection, it takes a screenshot of the entire display then crops it based on the output of the region selection tool, in your case slurp. It's possible that gscreenshot needs to adjust something by the scaling ratio.
Reproducible in KDE
This should be working in gscreenshot 3.6.1
I'm afraid it still doesn't work for me, but I'll do some more digging
Try out version 3.6.2 which I just released this morning and see if it works any better. One of the Gtk calls was wrong and gscreenshot was falling back to another method of getting the scaling that might not have been accurate on your setup.
Unfortunately no, now I get something like this:
It seems to be larger (dilated down and to the right) than the region selection I had chosen, even going off the screen. For comparison, with grim/slurp:
One thing to consider is that I am currently using two monitors with different scaling; this could potentially be a problem in detecting scaling. One is a 1920x1080 external display with no scaling and the other is a 2256x1504 laptop screen with 1.5 scaling. However, even when I disconnect the external display, the problem persists, so I doubt this is the cause of the issue.
If it would help, I'd be happy to run a version with debugging/print statements and send the output here.
Summary
I am having trouble using gscreenshot's region capture on Wayland. I am using sway with fractional scaling (1.5x). When I attempt to take a screenshot via a region selection, the resulting image is of a smaller region than I selected, with corners up and to the left of the selected region.
gscreenshot examples
For example, here is a screenshot of the entire screen (no region selection):
And here is a screenshot where I have used selected the entire screen as a region:
I do not have this problem when sway is unscaled (
swaymsg output eDP-1 scale 1.0
or similar). Here is a screenshot using a region selection of the whole screen with 1.0 scaling:The problem persists with 2.0 scaling, so it is not an issue of fractional or whole-number scaling. Here is a screenshot using region selection of the whole screen with 2.0 scaling:
This screenshot is (visually) exactly half the screen, so I imagine the program somehow misinterprets scaled coordinates.
grim/slurp examples
I do not have this same problem with "raw" grim/slurp region selection (
grim -g "$(slurp)"
).No region selection:
Region selection of the entire screen:
Some information
gscreenshot --version