Bug 455394 - Vertically-arranged monitors' alignment is off by one pixel
Summary: Vertically-arranged monitors' alignment is off by one pixel
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kscreen (show other bugs)
Version: 5.25.0
Platform: Neon Linux
: HI normal (vote)
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: regression
: 418459 420465 423939 424265 425192 436460 438155 454578 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-16 10:51 UTC by Riccardo Robecchi
Modified: 2022-11-21 21:09 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2022-06-16 10:51:11 UTC
SUMMARY
I have a dual-screen setup: my laptop is connected to an external monitor through a docking station. The displays are arranged vertically both physically and in configuration and have the same resolution (1920 x 1080). I have noticed, however, that screenshots of the whole visible area have a resolution of 1921 x 2160 and, when looking closely, this is because the top display is shifted to the left by one pixel (or the bottom one is shifted to the right). This is despite the KCM reporting the alignment as perfect.

STEPS TO REPRODUCE
1. Attach a second monitor
2. Arrange it vertically in the KCM so that it is perfectly aligned to the bottom one

OBSERVED RESULT
The alignment is off by one pixel.

EXPECTED RESULT
The alignment is perfect.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-11-09 20:42:13 UTC
*** Bug 438155 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2022-11-09 20:42:18 UTC
*** Bug 423939 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2022-11-09 20:45:24 UTC
*** Bug 425192 has been marked as a duplicate of this bug. ***
Comment 4 Bug Janitor Service 2022-11-10 08:37:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/153
Comment 5 Alexander Volkov 2022-11-10 14:47:05 UTC
Git commit 6faf4d6b89e826db00198e270675e966ec09d0d0 by Alexander Volkov.
Committed on 10/11/2022 at 08:34.
Pushed by volkov into branch 'master'.

Fix right to right snapping

target.right() is calculated as target.x() + target.width() - 1, so
1 needs to be added to the x coordinate of a snapped rect.

This is done in snapToBottom(), but was forgotten in snapToRight().
Amend 6309d33f092e60a96ce38b32cb295a3e54347cb9.

M  +1    -1    kcm/output_model.cpp

https://invent.kde.org/plasma/kscreen/commit/6faf4d6b89e826db00198e270675e966ec09d0d0
Comment 6 Nate Graham 2022-11-10 14:50:06 UTC
Git commit fab815b0564ea08202b5bd3429f580c6c5a742d3 by Nate Graham, on behalf of Alexander Volkov.
Committed on 10/11/2022 at 14:49.
Pushed by ngraham into branch 'Plasma/5.26'.

Fix right to right snapping

target.right() is calculated as target.x() + target.width() - 1, so
1 needs to be added to the x coordinate of a snapped rect.

This is done in snapToBottom(), but was forgotten in snapToRight().
Amend 6309d33f092e60a96ce38b32cb295a3e54347cb9.


(cherry picked from commit 6faf4d6b89e826db00198e270675e966ec09d0d0)

M  +1    -1    kcm/output_model.cpp

https://invent.kde.org/plasma/kscreen/commit/fab815b0564ea08202b5bd3429f580c6c5a742d3
Comment 7 Nate Graham 2022-11-10 21:27:43 UTC
*** Bug 418459 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-11-10 22:35:13 UTC
*** Bug 436460 has been marked as a duplicate of this bug. ***
Comment 9 Nate Graham 2022-11-12 14:32:49 UTC
*** Bug 424265 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2022-11-12 15:05:41 UTC
*** Bug 454578 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2022-11-13 16:09:40 UTC
*** Bug 420465 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2022-11-21 21:09:58 UTC
*** Bug 423939 has been marked as a duplicate of this bug. ***