Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Preview of screenshot is scaled after changing desktop size #844

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

Closed
troffasky opened this issue Mar 23, 2022 · 26 comments
Closed

Preview of screenshot is scaled after changing desktop size #844

troffasky opened this issue Mar 23, 2022 · 26 comments
Assignees
Labels

Comments

@troffasky
Copy link

Describe the bug
The frozen preview of the screen is scaled, if the desktop dimensions have changed since starting ksnip. If you select the "right" area, it will capture it correctly, but you have to guess as you won't snip what it looks like you will snip

To Reproduce
Steps to reproduce the behavior:

  1. Start ksnip, take an area screenshot, all is OK
  2. Change desktop size, eg by connecting a monitor
  3. Take an area screenshot.
  4. The preview is scaled

Expected behavior
The frozen preview should not be scaled.

Desktop (please complete the following information):

  • OS: Linux
  • Distribution in case of Linux: Ubuntu 21.10
  • Window System: X11/KDE
  • ksnip version: 1.9.2
  • How did you install ksnip: .deb package

Additional context
I am pretty sure this issue appeared after upgrading from 1.9.1 to 1.9.2

@troffasky troffasky added the bug label Mar 23, 2022
@DamirPorobic
Copy link
Member

Yes, there were some changes in this area. Can you double check if it's happening also with the latest continuous build?

@troffasky
Copy link
Author

Version: 1.10.0-continuous
Build: 1-84bbb9e

behaves the same. Observe how wide the pixels are.
ksnip1 10

@DamirPorobic
Copy link
Member

Pushed a fix, can you check if it fixes your issue? The pepile needs a couple of minutes to build.

@troffasky
Copy link
Author

Version: 1.10.0-continuous
Build: 1-d59af45

Doesn't seem to have made any difference, unfortunately.

@DamirPorobic DamirPorobic self-assigned this Apr 6, 2022
DamirPorobic added a commit that referenced this issue Apr 6, 2022
@DamirPorobic
Copy link
Member

Pushed a new fix, can you please test again?

@Sqbika
Copy link

Sqbika commented Apr 7, 2022

I'm using the AUR git version, after update and reboot, changing screens still result in this.

  • OS: Linux
  • Distribution in case of Linux: Arch Linux 5.17.1-zen1-1-zen
  • Window System: X11/KDE
  • ksnip version: 1.9.2 (AUR: 1.10.0_r2626.g9f88107b-1)
  • How did you install ksnip: AUR ksnip-git

Edit: In this case, I had only 1 monitor, enabled the second one and did the screenshot
Edit 2: Tried with the continuous AppImage, in that one this does not happen

image

@DamirPorobic
Copy link
Member

@Sqbika I'm a bit confused by this version there ksnip version: 1.9.2 (AUR: 1.10.0_r2626.g9f88107b-1), the commit hash seems right but where does the 1.9.2 come from?

@Sqbika
Copy link

Sqbika commented Apr 7, 2022

@Sqbika I'm a bit confused by this version there ksnip version: 1.9.2 (AUR: 1.10.0_r2626.g9f88107b-1), the commit hash seems right but where does the 1.9.2 come from?

The application reports 1.9.2 whenever invoked with -v, with an empty build string

image

@DamirPorobic
Copy link
Member

Yeah, the 1.9.2 is a finished version that is not changing any longer. The fix is in 1.10.0 which is still work in progress.

@Sqbika
Copy link

Sqbika commented Apr 7, 2022

Yeah, the 1.9.2 is a finished version that is not changing any longer. The fix is in 1.10.0 which is still work in progress.

Okay, that was a very amateur oversight from me. And old ksnip version was lingering in /usr/local/bin, which overrode the ksnip-git version. After removing that and reinstalling the ksnip-git, now the 1.10.0 version is installed and issue is fixed too!
Thank you

@DamirPorobic
Copy link
Member

Awesome! Let's wait for OP's feedback before closing this issue then.

@troffasky
Copy link
Author

Well that's interesting. I just tried
Version: 1.10.0-continuous
Build: 1-9f88107
.deb and the issue is still there??? I will try the appimage, see if it's any different.

@DamirPorobic
Copy link
Member

That is then indeed interesting, I was able to reproduce it. The commit hash there seems correct, it's from the About dialog?

@Sqbika
Copy link

Sqbika commented Apr 7, 2022

That is then indeed interesting, I was able to reproduce it. The commit hash there seems correct, it's from the About dialog?

After double checking, the toggling of displays works, but changing the display resolution does not do the recalculation

@DamirPorobic
Copy link
Member

Yes, this was about changing monitor count, didn't take into just switching resolution.
Can you switch resolution on X11 without logging out? Or was that only for scaling change?

@Sqbika
Copy link

Sqbika commented Apr 7, 2022

Yes, this was about changing monitor count, didn't take into just switching resolution. Can you switch resolution on X11 without logging out? Or was that only for scaling change?

Resolution change doesn't require logging out (I'm using ARandR for changing resolution), scaling requires logout on KDE

@DamirPorobic
Copy link
Member

Ok, I'll have a look into it tonight to cover that case too.

@DamirPorobic
Copy link
Member

Next round, give it a try again, the resolution change use case should be covered now.

@troffasky
Copy link
Author

troffasky commented Apr 8, 2022

I hadn't realised that there would be a subtle difference between switching monitors + dimensions and just switching dimensions, so my bug report and subsequent testing didn't account for this [in other words, I can't recall exactly which way I was testing this at any previous point].
Switching monitors and dimension, this is now working for me with
Version: 1.10.0-continuous
Build: 1-f604ee2
installed with .deb file.
It doesn't fix the case of just switching dimensions without switching monitors. I will test this now with the appimage just in case.

@troffasky
Copy link
Author

Appimage isn't any different.

@Sqbika
Copy link

Sqbika commented Apr 8, 2022

For the ksnip-git package, the detections works for both resolution, orientation and toggling monitors

@DamirPorobic
Copy link
Member

@troffasky How many monitors do you have? Any screen scaling? What is the monitor setup (left right, bottom, top)? Where do you change the resolution, on one, (left, right) or both?

@troffasky
Copy link
Author

Laptop + monitor. The monitor is 4K but the laptop cannot drive both the monitor and the builtin display simultaneously at higher resolutions, so I am only ever using one at a time.

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
eDP-1 connected (normal left inverted right x axis y axis)
HDMI-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 697mm x 392mm

"Global scale" is set to 100% so I guess that means there is no scaling.
When I am changing resolution, I am doing it on the external, going between 2560x1440 and 1920x1080. No rotation.

@DamirPorobic
Copy link
Member

So basically you have a single monitor on which you change the resolution? Haven't tried that I think, I always changed it on my secondary. I'll try to reproduce later.

@MurzNN
Copy link
Contributor

MurzNN commented May 12, 2022

Next round, give it a try again, the resolution change use case should be covered now.

I've tested with version 1.10.0-continuous (build: 1-626c2c8) and this issue is fixed, thanks!

@troffasky
Copy link
Author

Sorry I didn't update this earlier, yes this is fixed for me.

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

No branches or pull requests

4 participants