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

Skip to content

Wrong area is captured on a Wayland screen scaling #691

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
trustin opened this issue Jul 30, 2021 · 13 comments
Closed

Wrong area is captured on a Wayland screen scaling #691

trustin opened this issue Jul 30, 2021 · 13 comments
Assignees
Labels

Comments

@trustin
Copy link

trustin commented Jul 30, 2021

Describe the bug
When I choose a rectangular area on my screen, a wrong area of the screen is captured. The captured area has incorrect X and Y coordinate and incorrect scale. It has correct width and height.

To Reproduce
Steps to reproduce the behavior:

  1. Run ksnip --rectarea
  2. Choose an area.
  3. Press 'Enter' key.
  4. The wrong area is captured.

Expected behavior
The capture area has to match the rectangular area a user selected.

Screenshots
Will post once requested.

Desktop (please complete the following information):

  • Manjaro Linux (Up to date as of 30-Jul-2021)
  • GNOME 40.3.0 with Wayland (XWayland)
  • ksnip 1.9.0, installed from Manjaro official repository via pacman
  • Fractional scaling enabled (250%) on 4K display (only one display)
  • ~/.config/monitors.xml:
     <monitors version="2">
       <configuration>
         <logicalmonitor>
           <x>0</x>
           <y>0</y>
           <scale>2.5</scale>
           <primary>yes</primary>
           <monitor>
             <monitorspec>
               <connector>eDP-1</connector>
               <vendor>SHP</vendor>
               <product>0x14fa</product>
               <serial>0x00000000</serial>
             </monitorspec>
             <mode>
               <width>3840</width>
               <height>2400</height>
               <rate>59.994422912597656</rate>
             </mode>
           </monitor>
         </logicalmonitor>
       </configuration>
     </monitors>
    

Additional context

None

@trustin trustin added the bug label Jul 30, 2021
@DamirPorobic
Copy link
Member

Will have a look into this.

@DamirPorobic
Copy link
Member

@trustin one question though, do you have single or dual monitor (or more) setup?

@soflare
Copy link

soflare commented Sep 16, 2021

I encountered the same issue.
My OS is Ubuntu 21.04 (Gnome 3.38.5, Wayland).
My scale value is 125% and I have only one monitor.

@DamirPorobic
Copy link
Member

Thanks for the feedback, I'll have a look.

@trustin
Copy link
Author

trustin commented Sep 22, 2021

I have a single monitor setup. Thanks a lot for looking into!

@DamirPorobic
Copy link
Member

Can someone double check if the issue still happens with the continuous build? I have just pushed a fix, it might need ~20min to get published. Thought it targets another issue but might affect this one too.

@DamirPorobic DamirPorobic self-assigned this Oct 17, 2021
@soflare
Copy link

soflare commented Oct 21, 2021

I just tried the latest(1d98db4) continuous build. The issue is not fixed.
I tried to capture my terminal window by rectangular area. Here is the different of the captured image I got with the window on screen.

I also tried other capture methods. "Full Screen" and "Active Window" functions are correct. "Current Screen" is wrong.

@DamirPorobic
Copy link
Member

Thanks for checking, I'll look into it further.

@DamirPorobic DamirPorobic changed the title Wrong area is captured on a XWayland screen with 250% fractional scaling Wrong area is captured on a Wayland screen scaling Nov 13, 2021
@DamirPorobic
Copy link
Member

Can you please check with latest build if the issue persists?

@DamirPorobic
Copy link
Member

Assuming this one is fixed, closing the issue. If the problem persists please reopen.

@DamirPorobic DamirPorobic pinned this issue Nov 19, 2021
@DamirPorobic DamirPorobic unpinned this issue Nov 19, 2021
@xriser
Copy link

xriser commented Feb 10, 2022

Hi, I have the same issue
Tried v1.9.2 and Version: 1.10.0-continuous Build: 1-55412e3
The issue persists in both versions
I am using Ubuntu desktop 21.10

@DamirPorobic
Copy link
Member

@xriser Is the rect selection area incorrectly positioned?

@xriser
Copy link

xriser commented Feb 11, 2022

@xriser Is the rect selection area incorrectly positioned?

yes, it is incorrectly positioned(like shifted left and top) and the resulting image is zoomed and cropped

I am using a fractional scaling 150%
Selecting:
image
Result:
image

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