Bug 501731

Summary: "Quick Tile Window to" actions need a second step to move to correct if target window is already tiled
Product: [Plasma] kwin Reporter: Christoph Dunschen <christoph.dunschen>
Component: Quick TilingAssignee: KWin default assignee <kwin-bugs-null>
Status: CLOSED FIXED    
Severity: normal CC: nate, scott, vlad.zahorodnii
Priority: NOR Keywords: regression
Version First Reported In: 6.3.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.3.4
Sentry Crash Report:
Attachments: My config
My configuration
Starting positon of window
When I press first time Meta+F4
When I press the second time Meta+F4

Description Christoph Dunschen 2025-03-19 05:47:20 UTC
Created attachment 179563 [details]
My config

***
"Quick Tile Window to" function need a second step to move to correct position
***

SUMMARY
With one of the last 6.3 Plasma updates, the "Quick Tile Window to " function is broken.

STEPS TO REPRODUCE
1. See my config at attachment "KWin01.jpg" (overwrite setting if asked...)
2. When I have a window in "Top Left" position and press Meta+F4, result is in the middle of screen
3. Pressing Meta+F4 again, the correct position "Bottom Right" is found

OBSERVED RESULT
Need to press Meta+F4 two times to reach correct position

EXPECTED RESULT
Press Meta+F4 only one time

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Christoph Dunschen 2025-03-19 05:47:58 UTC
Created attachment 179564 [details]
My configuration
Comment 2 Christoph Dunschen 2025-03-19 05:50:42 UTC
Created attachment 179565 [details]
Starting positon of window
Comment 3 Christoph Dunschen 2025-03-19 05:51:15 UTC
Created attachment 179566 [details]
When I press first time Meta+F4
Comment 4 Christoph Dunschen 2025-03-19 05:51:51 UTC
Created attachment 179567 [details]
When I press the second time Meta+F4
Comment 5 Nate Graham 2025-03-19 21:26:44 UTC
Can reproduce. The spatial tiling changes should probably only affect when tiling via arrow keys, not when using the shortcuts that tile directly to exact positions on screen.
Comment 6 Bug Janitor Service 2025-03-20 06:50:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7367
Comment 7 Vlad Zahorodnii 2025-03-21 06:24:38 UTC
Git commit 94048faba57ad8d51be7db36d51fd2495ecf53b1 by Vlad Zahorodnii.
Committed on 21/03/2025 at 06:15.
Pushed by vladz into branch 'master'.

Combine tile modes when tiling via arrow keys

It takes some effort for the human processing unit (aka brain) to combine
quarter tile modes with other tile modes.

This change allows only half tile modes to be combined with other modes,
it is easier to comprehend and it produces fewer unexpected results.

M  +8    -8    autotests/integration/quick_tiling_test.cpp
M  +13   -1    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/94048faba57ad8d51be7db36d51fd2495ecf53b1
Comment 8 Vlad Zahorodnii 2025-03-21 06:50:27 UTC
Git commit b161b5c1f4007495dc41f1de4c497cf6d3c93a2f by Vlad Zahorodnii.
Committed on 21/03/2025 at 06:30.
Pushed by vladz into branch 'Plasma/6.3'.

Combine tile modes when tiling via arrow keys

It takes some effort for the human processing unit (aka brain) to combine
quarter tile modes with other tile modes.

This change allows only half tile modes to be combined with other modes,
it is easier to comprehend and it produces fewer unexpected results.


(cherry picked from commit 94048faba57ad8d51be7db36d51fd2495ecf53b1)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +8    -8    autotests/integration/quick_tiling_test.cpp
M  +13   -1    src/window.cpp

https://invent.kde.org/plasma/kwin/-/commit/b161b5c1f4007495dc41f1de4c497cf6d3c93a2f
Comment 9 Vlad Zahorodnii 2025-03-21 06:51:26 UTC
Git commit d6290dff420f5d5cf7303adafce413a2ea93135d by Vlad Zahorodnii.
Committed on 21/03/2025 at 06:32.
Pushed by vladz into branch 'master'.

Combine tile modes when tiling via arrow keys

It takes some effort for the human processing unit (aka brain) to combine
quarter tile modes with other tile modes.

This change allows only half tile modes to be combined with other modes,
it is easier to comprehend and it produces fewer unexpected results.

M  +8    -8    autotests/integration/quick_tiling_test.cpp
M  +13   -1    src/window.cpp

https://invent.kde.org/plasma/kwin-x11/-/commit/d6290dff420f5d5cf7303adafce413a2ea93135d
Comment 10 Christoph Dunschen 2025-04-03 04:46:28 UTC
Is fixed with "6.3.4-1" version. Thank you very much!
Comment 11 Scott Olson 2025-05-16 20:14:49 UTC
The "Quick Tile Window to" actions appear to still be broken in 6.3.5, relative to how they were before the start of the year.

For example, if I have a window in the bottom-right quarter of my screen, "Quick Tile Window to the Left" previously would have moved it to take up the left half of my screen. Currently, it instead moves the window to take up the *bottom* half of my screen (because it's seemingly extending to the left from its current position).

The fundamental problem seems to be that these actions used to be "absolute" but they were unexpectedly changed to be "relative". Under the original behaviour, "to the Left" would have the same meaning regardless of the current position.

I had bound all 8 of these actions to Meta plus numpad digits, which nicely correspond to the 8 possible locations I could snap a window into with a single keypress. Now moving between different positions (e.g. from bottom-right to the left) takes an unpredictable number of actions. (In my example, even mashing the left direction will only get you to the bottom-left, not the whole left, so you have to stop and think how to proceed instead of reaching the goal in one press).
Comment 12 Vlad Zahorodnii 2025-05-17 15:49:23 UTC
The patch above prevents combining quarter tile modes to other tile modes, which this bug report is about, tile modes such as "to the left" are still combined.
Comment 13 Scott Olson 2025-05-17 16:34:59 UTC
Filed separately for the still-remaining unexpected behavioural changes: https://bugs.kde.org/show_bug.cgi?id=504426