SUMMARY When compositor's rendering backend is set to OpenGL (either 2.0 or 3.1), KWin sometimes does not emit windowShown events. This breaks various tiling scripts such as https://github.com/esjeon/krohnkite There are two observed workarounds: * Switch rendering backend to XRender (this works but it causes tearing) * Open compoistor settings, change any setting (such as Scale Method), Apply, revert previous change, Apply. After this, events will work until next reboot. STEPS TO REPRODUCE 1. Install https://github.com/esjeon/krohnkite KWin script 2. Open two windows OBSERVED RESULT Windows are not tiled. EXPECTED RESULT Windows should be tiled. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.6.15-1-MANJARO 64-bit (available in About System) KDE Plasma Version: 5.18.5 KDE Frameworks Version: 5.70.0 Qt Version: 5.15.0 It also happens with 5.19.0 (I don't have machine with that version at hand right now though, so I cannot report proper versions) ADDITIONAL INFORMATION See following thread for more info: https://github.com/esjeon/krohnkite/issues/46
I can consistently reproduce this issue on Gentoo, KWin version 5.22.3: New windows are still not managed tiled by Kröhnkite, but tiling kicks in after switching to another virtual desktop.
Switching from OpenGL 2.0 compositor to OpenGL 3.1 just fixed it for me. Interestingly, this comment [1] claims that switching from 3.1 to 2.0 fixed it. Maybe Something (tm) is reset after changing the compositor?
That's right. If you switch from OpenGL 3.1 to OpenGL 2.0, compositing will be restarted. As for the issue itself, I recommend avoid using the windowShown signal. KWin may decide not to emit it in some cases even if the window is effectively hidden. The alternative is to check whether a particular window is on the current activity/virtual desktop + minimized state.
(In reply to Denis Kurz from comment #1) > I can consistently reproduce this issue on Gentoo, KWin version 5.22.3: New > windows are still not managed tiled by Kröhnkite, but tiling kicks in after > switching to another virtual desktop. KWin will emit the windowShown and the windowHidden in that case.
This bug was reported against an outdated version of KWin. We have made many changes since the. If the issue persists in newer versions can you reopen the bug report updating the version number.