Bug 500666 - Custom Tiling directional keyboard shortcuts don't work properly when display scaling is set to anything other than 100%
Summary: Custom Tiling directional keyboard shortcuts don't work properly when display...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: Custom Tiling (show other bugs)
Version: 6.3.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-24 14:02 UTC by me
Modified: 2025-02-27 23:17 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description me 2025-02-24 14:02:36 UTC
SUMMARY
Custom Tiling directional keyboard shortcuts don't work properly when display scaling is set to anything other than 100%.

## STEPS TO REPRODUCE
1. Create a custom tile layout with multiple zones
2. Configure keyboard shortcuts for directional movement between custom tile zones (up/down/left/right)
3. Set display scaling to a value other than 100% (e.g., 125%, 150%)
4. Open a window and attempt to move it between different custom tile zones using the configured shortcuts

OBSERVED RESULT
- All directional shortcuts move the window to the same (typically nearest) custom tile, regardless of the specified direction
- Once a window is placed in a custom tile, no directional shortcuts can move it to a different tile position

EXPECTED RESULT
- Each directional shortcut should move the window to the appropriate custom tile in the specified direction
- Windows should be able to move between different custom tile positions using directional shortcuts

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.13.3-1, wayland
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
- The issue does not occur when desktop scaling is set to 100%
- This bug relates to the new feature in 6.3.0 that allows setting keyboard shortcuts to move windows between Custom Tiling zones based on direction
- Related feature "bug": https://bugs.kde.org/show_bug.cgi?id=466687
Comment 1 TraceyC 2025-02-24 17:43:45 UTC
I can confirm this on git-master

I had a KWrite window open, floating on the right part of the screen
Tiling - left third split horizontall, middle third one tile, right third split horizontally

After performing setup as described, I used the shortcut for custom tile right
The window was moved to the left, to the middle tile
Comment 2 TraceyC 2025-02-24 17:44:46 UTC
My display was set to 100% scaling. The behavior is the same with 125% scaling.
Comment 3 Akseli Lahtinen 2025-02-25 09:14:32 UTC
I can reproduce the bug with 125% only. 100% works.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.12.15-200.fc41.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 4 me 2025-02-25 11:14:22 UTC
(In reply to Akseli Lahtinen from comment #3)
> I can reproduce the bug with 125% only. 100% works.
> 
> Operating System: Fedora Linux 41
> KDE Plasma Version: 6.3.80
> KDE Frameworks Version: 6.12.0
> Qt Version: 6.8.2
> Kernel Version: 6.12.15-200.fc41.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

In my experience in 100% scale also works, as in bug description.
Comment 5 Daniel Kraus 2025-02-26 06:15:41 UTC
confirmed over here and it really only occurs with scale factor != 1.0
Comment 6 Bug Janitor Service 2025-02-27 14:14:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7242
Comment 7 Akseli Lahtinen 2025-02-27 18:15:39 UTC
Git commit 69a2d95e4bc3493a6d1bde66f0e7deee39e2bbf3 by Akseli Lahtinen.
Committed on 27/02/2025 at 18:06.
Pushed by akselmo into branch 'Plasma/6.3'.

window: Compare currentTile to requestedTile

On scaled displays, the previous geometry comparisons got
rounded differently (or not rounded at all), and thus did not match
1-to-1. This caused the tiling to always get the first position,
instead of moving to next one.

This patch just compares the currentTile to previously requestedTile.
If none is found, we request a new tile.

M  +1    -1    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/69a2d95e4bc3493a6d1bde66f0e7deee39e2bbf3