https://bugs.kde.org/show_bug.cgi?id=487596

            Bug ID: 487596
           Summary: Screenshot region selection broken with fractional
                    scaling on multi-monitor setups (X11)
    Classification: Applications
           Product: Spectacle
           Version: 23.08.5
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: noaha...@gmail.com
          Reporter: m...@fsfe.org
                CC: k...@david-redondo.de
  Target Milestone: ---

SUMMARY

When Spectacle is used to select a rectangular region (i.e. executing
"spectacle --region") on setups using multiple monitors and fractional scaling
(on X11), the screen image where the rectangular selection happens shows a
distorted and shifted image of the screen.
This makes it impossible to select the correct region as the displayed image
does not match the actual screen contents.

STEPS TO REPRODUCE

1. Attach a secondary monitor.
2. Configure monitors to be side by side (see below).
3. In System Settings set global scaling to 125%.
4. Run "spectacle --region". 

Excerpt from "~/.config/kdeglobals":

```
[KScreen]
ScaleFactor=1.25
ScreenScaleFactors=eDP-1=1.25;DP-1=1.25;DP-2=1.25;DP-3=1.25;
```

Example screen alignment as reported by `xrandr`:

```
eDP-1 connected 1600x900+0+180
DP-1 connected primary 1920x1080+1600+0
```

OBSERVED RESULT

The surface where the rectangular selection box is drawn on does not represent
the actual screen contents, it displays a distorted image of contents from both
screens where areas of the screens are repeated or shifted around.
This mainly affects the primary monitory but if the secondary monitor does not
have the same resolution as the primary one, it will also show a distorted
image.

After the screenshot has been taken it seems that the actual recording does
match the screen contents, only the preview is misrepresenting the state which
makes it almost impossible to select the correct region.

EXPECTED RESULT

The screen image during rectangular region selection should represent the
actual contents of screens.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Platform: X11

ADDITIONAL INFORMATION

Note 1

The issue can be reproduced using VirtualBox easily utilizing its functionality
to attach a second virtual display (if guest additions are installed) and
reproducing a screen arrangement as described above accordingly.

Note 2

The issue is not exclusive to Kubuntu.
It also affects the following NixOS configuration:

Linux/KDE Plasma: NixOS 23.11
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.12
Platform: X11

Note 3

LXQt's screenshot tool ("screengrab") seems to suffer from similar issues and
its author suspects it to be a Qt bug related to screen coordinates:
https://github.com/lxqt/screengrab/issues/211

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to