Bug 508440

Summary: Windows don't redraw properly when unminimized to a different size than they were minimized from (Krohnkite)
Product: [Plasma] kwin Reporter: Ken Bloom <kbloom>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: bugs.kde.org, nate
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Video of this beahvior happening in Dolphin
Reproduction on the latest KDE Neon Testing (live image), with latest Krohnkite (installed today)

Description Ken Bloom 2025-08-18 21:08:27 UTC
Chrome windows sometimes fail to redraw properly when unminimizing. Moving my mouse into the chrome window helps it stabilize, but moving the window might be needed 

See attached screencast.

* Kwin-wayland 6.3.5 Debian package 4:6.3.5-1
* Chrome 139.0.7258.127 with --ozone-platform=wayland
* Using the Krohnkite Kwin script for tiling.
Comment 1 Ken Bloom 2025-08-18 21:10:52 UTC
I'm still trying to figure out how to upload my too-large video of this, but I also just saw this redraw behavior happen with Dolphin.
Comment 2 Ken Bloom 2025-08-18 21:12:25 UTC
Created attachment 184228 [details]
Video of this beahvior happening in Dolphin
Comment 3 Ken Bloom 2025-08-18 21:13:27 UTC
Krohnkite (the tiling script I'm using) is developed at https://github.com/anametologin/krohnkite/
Comment 4 Nate Graham 2025-08-18 21:18:32 UTC
Thanks for the bug report. Can you do some troubleshooting to determine the circumstances under which it happens?

e.g.
- In a new clean user account
- In your normal user account without Krohnkite
- With Chrome in X11 mode
- With KWin 6.4 in a distro that ships up-to-date versions of desktop software that hugely benefits from being up-to-date rather than up to 2-3 years old
Comment 5 Ken Bloom 2025-08-19 14:09:44 UTC
Created attachment 184258 [details]
Reproduction on the latest KDE Neon Testing (live image), with latest Krohnkite (installed today)

Latest KDE Neon Testing (see the Info Center in the video), running from a live image (so clearly a new user account).

I haven't tried without Krohnkite yet, and it looks like the bug may be a window unminimizing to a different (larger) size than it was when I minimized it. I'm not sure how to reproduce that without Krohnkite, but I'll try.
Comment 6 Ken Bloom 2025-08-19 14:20:50 UTC
This does not reproduce when using Polonium as my tiling script instead of Krohnkite. (Polonium as I understand it uses KWin's tiling feature to manage tiled windows, while Krohnkite does not.)
Comment 7 Ken Bloom 2025-08-20 15:14:52 UTC
I also filed this bug against Krohnkite as https://github.com/anametologin/krohnkite/issues/216, but I suspect this is a KWin issue. I expect that even if Krohnkite could fix the glitch by using KWin scripting APIs differently, we would still want KWin to ensure that this can't happen, even if its scripting APIs are used incorrectly.
Comment 8 Ken Bloom 2025-08-21 15:11:09 UTC
In case it's not clear from the video, the sequence to reproduce is:

1. Install the Krohnkite Kwin script, activate it and restart your session.
2. Open 2 windows. Krohnkite will make each window take half the screen.
2. Minimize window 1. This is minimized from half-screen. Krohnkite will resize window 2 to fill the screen.
3. Minimize window 2. This is minimized from full screen.
4. Unminimize window 1. (Even though it was minimized from half-screen, Krohnkite will unminimize it to full screen.)
Comment 9 Piotr Dobrogost 2025-09-17 07:14:53 UTC
(In reply to Ken Bloom from comment #8)
> In case it's not clear from the video, the sequence to reproduce is:
> 2. Minimize window 1. This is minimized from half-screen. Krohnkite will
> resize window 2 to fill the screen.
> 3. Minimize window 2. This is minimized from full screen.

Please be careful when saying about full-screen windows as this has special meaning in the context of window manager. Krohnkite makes sole window occupy whole screen but it does not make it full screen which is a special state of a window. What's more Krohnkite does not touch full-screen windows at all (it does not tile them).