flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

--Region does not understand pixel scaling (DPI)

Open wd5gnr opened this issue 2 years ago • 6 comments

Flameshot Version

Current

Installation Type

Compiled from source

Operating System type and version

KDE Neon

Description

I noticed that with KDE scaling (1.25X) the region argument on CLI gets confused

 xdotool getwindowgeometry --shell 8126472
WINDOW=8126472
X=1920
Y=1121
WIDTH=1920
HEIGHT=1037
SCREEN=0

Then flameshot gui --region 1920x1037+1920+1121 Does not do what you expect

Since the scale is 1.25:

flameshot gui --region 1536x830+1536+897

works.

ATM don't have time to run down where this is happening, but it has to be scale on those arguments.

Steps to reproduce

Set scaling to something other than 1

Find coordinates on the screen you are sure of

Run with --region argument

Note that the region is incorrect

Screenshots or screen recordings

No response

System Information

KDE Neon

wd5gnr avatar Jul 11 '22 14:07 wd5gnr

@mmahmoudian This affects your excellent dmenu script adversely, also. I stripped part of it out and was using it successfully until I changed scaling which is what had me notice this.

wd5gnr avatar Jul 11 '22 14:07 wd5gnr

I'm on Manjaro KDE and to me it seems everything works fine with global fractional scaling 125%:

https://user-images.githubusercontent.com/390889/178290499-78239f9f-a572-4c9f-9fdd-bba68cec9790.mp4

mmahmoudian avatar Jul 11 '22 14:07 mmahmoudian

Can you try if your font DPI is forced? Appearance | Fonts, Force font DPI? I also have that set so maybe that's the issue. Then the question is does that matter. But I think it has worked before with that set for me and it has been since the 1.25x. I just rebooted so I will try again.

wd5gnr avatar Jul 11 '22 15:07 wd5gnr

Update: with DPI scalling set off and at 1.25x the same problem occurs here. Very odd..

wd5gnr avatar Jul 11 '22 15:07 wd5gnr

I put a ruler wallpaper down. The Konsole window, xdotool reports as 1934x1276+959+427 which is pretty close to what you can read from the scale. Ignoring my mistake of using --gui the first time, the second run is captured with --region, and you can see it is off about the 25%.

https://imgur.com/a/IkkhxLI

wd5gnr avatar Jul 11 '22 18:07 wd5gnr

Yes I can reproduce this on MacOS as well.

borgmanJeremy avatar Jul 12 '22 01:07 borgmanJeremy

it's mentioned in a merged PR -- can this issue be closed?

cedric-h avatar Nov 09 '22 18:11 cedric-h