Bug 469720

Summary: Gap between windows is different than the one being set
Product: [Plasma] kwin Reporter: Akseli Lahtinen <akselmo>
Component: Custom TilingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: nate, notmart
Priority: NOR    
Version: 5.27.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.27.6
Sentry Crash Report:

Description Akseli Lahtinen 2023-05-13 23:35:10 UTC
SUMMARY

If I set window PADDING to 2px, it is 2px when compared to screen edges (which is correct). However when I place two windows next to each other, they both add the 2px padding, creating a 4px gap. This a bit inconsistent and weird behavior.

STEPS TO REPRODUCE
1. Set window padding to 2 px
2. Place two windows next to each other


OBSERVED RESULT
The gap between windows is 4 px

EXPECTED RESULT
The gap between windows is 2 px

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.14-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Comment 1 Bug Janitor Service 2023-05-16 19:05:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4113
Comment 2 Ismael Asensio 2023-05-17 21:29:54 UTC
Git commit 2449b58974423b3be8e1382960299c586d42e645 by Ismael Asensio.
Committed on 17/05/2023 at 21:18.
Pushed by iasensio into branch 'master'.

tiles: Adjust padding between windows

Make the total padding between windows equal to the padding against the
screen borders by applying just half of it on the common borders.

Adjust tests accordingly.
FIXED-IN: 5.27.6

M  +26   -26   autotests/integration/tiles_test.cpp
M  +8    -1    src/tiles/tile.cpp

https://invent.kde.org/plasma/kwin/commit/2449b58974423b3be8e1382960299c586d42e645
Comment 3 Ismael Asensio 2023-05-17 21:44:45 UTC
Git commit 1f2c1ec9b3b2f3bee5a78eb2ee3ee6097e9b3b87 by Ismael Asensio.
Committed on 17/05/2023 at 21:32.
Pushed by iasensio into branch 'Plasma/5.27'.

tiles: Adjust padding between windows

Make the total padding between windows equal to the padding against the
screen borders by applying just half of it on the common borders.

Adjust tests accordingly.
FIXED-IN: 5.27.6


(cherry picked from commit 2449b58974423b3be8e1382960299c586d42e645)

M  +26   -26   autotests/integration/tiles_test.cpp
M  +8    -1    src/tiles/tile.cpp

https://invent.kde.org/plasma/kwin/commit/1f2c1ec9b3b2f3bee5a78eb2ee3ee6097e9b3b87