Bug 449541

Summary: Quick tile action via shortcut de-maximizes the window without tiling as a first action
Product: [Plasma] kwin Reporter: Nicholas Serrano <2019nicholas>
Component: coreAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate, till2.schaefer
Priority: NOR Keywords: wayland
Version: 5.23.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=376104
https://bugs.kde.org/show_bug.cgi?id=329136
Latest Commit: Version Fixed In: 5.24.1

Description Nicholas Serrano 2022-02-03 05:09:16 UTC
SUMMARY
Using a quick tile action via shortcut on a window that is currently maximized causes it to de-maximize without tiling. A subsequent quick tile action tiles as expected. 

EXPECTED RESULT
Using a quick tile action via shortcut on a window that is currently maximized will tile it immediately.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 35
(available in About System)
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Comment 1 Till Schäfer 2022-02-03 12:11:22 UTC
Cannot reproduce this with the same software versions. Are you using wayland or X11? 


Operating System: Gentoo Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.15.16-gentoo (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4810MQ CPU @ 2.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 2 Nicholas Serrano 2022-02-03 14:56:48 UTC
Currently using Wayland, I can confirm that when I switch to X11 the bugged behavior goes away so this is Wayland specific
Comment 3 Nate Graham 2022-02-03 18:13:04 UTC
I can't reproduce this on Wayland with current git master. A bunch of quick tiling fixes just went in, so I guess this got fixed!
Comment 4 Nicholas Serrano 2022-02-09 20:14:23 UTC
Just updated to the following:
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.5-200.fc35.x86_64 (64-bit)
Using https://copr.fedorainfracloud.org/coprs/zawertun/kde/

I'm still running into this issue however have noticed that it does not affect gtk applications, for example the "Problem Reporting" app on Fedora, or rnote from flathub. Should I expect to have seen different behavior in 5.24 or have those fixes not been pushed to a release yet.
Comment 5 Vlad Zahorodnii 2022-02-09 20:36:56 UTC
Cannot reproduce on wayland. Can you provide more detailed steps to reproduce?
Comment 6 Vlad Zahorodnii 2022-02-09 20:44:38 UTC
also, does this happen only with decorated windows? can you share your window deco settings (theme, and border size)?
Comment 7 Nicholas Serrano 2022-02-09 20:50:33 UTC
Ah I was typing up/recording a way to reproduce but saw your message. I was using Sierra Breeze Enhanced Window Decorations and after switching to Breeze the bugged behavior went away. It does seem associated with decorated windows when using that specific Window decoration theme. I assume I should open a bug report with the creator of Sierra Breeze Enhanced. (https://github.com/kupiqu/SierraBreezeEnhanced)
Comment 9 Vlad Zahorodnii 2022-02-09 21:09:24 UTC
(In reply to Nicholas Serrano from comment #7)
> Ah I was typing up/recording a way to reproduce but saw your message. I was
> using Sierra Breeze Enhanced Window Decorations and after switching to
> Breeze the bugged behavior went away. It does seem associated with decorated
> windows when using that specific Window decoration theme. I assume I should
> open a bug report with the creator of Sierra Breeze Enhanced.
> (https://github.com/kupiqu/SierraBreezeEnhanced)

No it's a kwin bug
Comment 10 Nicholas Serrano 2022-02-09 21:15:06 UTC
I see. Thanks for looking into the issue and asking the right questions as I hadn't provided much info initially. I'll keep an eye on the mr and update this report/open a new one if I run into any issues after updating kwin to a version that should have the fix.
Comment 11 Vlad Zahorodnii 2022-02-09 21:25:10 UTC
As a workaround, select "No Borders" border size in system settings. I believe it should fix the issue when using Sierra Breeze Enhanced
Comment 12 Vlad Zahorodnii 2022-02-09 21:25:26 UTC
"fix"
Comment 13 Nicholas Serrano 2022-02-09 22:05:10 UTC
(In reply to Vlad Zahorodnii from comment #11)
> As a workaround, select "No Borders" border size in system settings. I
> believe it should fix the issue when using Sierra Breeze Enhanced

This indeed works as a workaround, thanks for the tip
Comment 14 Vlad Zahorodnii 2022-02-10 09:08:26 UTC
Git commit c54937b2ad5afd02f7cfc19916f74e7fa8ab0bbb by Vlad Zahorodnii.
Committed on 10/02/2022 at 08:43.
Pushed by vladz into branch 'master'.

Avoid mixing current and next state

Mixing of current and next state can create all sorts of undefined
behavior, e.g. windows not moving to the desired location or
experiencing issues when tiling a maximized window.

M  +5    -6    src/abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/c54937b2ad5afd02f7cfc19916f74e7fa8ab0bbb
Comment 15 Vlad Zahorodnii 2022-02-10 09:26:17 UTC
Git commit 733469d4e7648cd1df0862c8879ac364594935da by Vlad Zahorodnii.
Committed on 10/02/2022 at 09:19.
Pushed by vladz into branch 'Plasma/5.24'.

Avoid mixing current and next state

Mixing of current and next state can create all sorts of undefined
behavior, e.g. windows not moving to the desired location or
experiencing issues when tiling a maximized window.
(cherry picked from commit c54937b2ad5afd02f7cfc19916f74e7fa8ab0bbb)

M  +5    -6    src/abstract_client.cpp

https://invent.kde.org/plasma/kwin/commit/733469d4e7648cd1df0862c8879ac364594935da