Bug 511612 - Wrong window borders if application is not constantly rendering
Summary: Wrong window borders if application is not constantly rendering
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (other bugs)
Version First Reported In: 6.5.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-04 11:52 UTC by Bartosz Taudul
Modified: 2025-11-06 14:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Illustration of the issue (176.03 KB, image/png)
2025-11-04 11:52 UTC, Bartosz Taudul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Taudul 2025-11-04 11:52:11 UTC
Created attachment 186482 [details]
Illustration of the issue

SUMMARY
The window decorations (server side) do not accurately represent the actual window state. There is a one-frame lag for the window outline updates. Note that this one-frame lag is controlled not by kwin, but by the application. The application may not need to render the window contents, in which case the effects of the lag are seen for extended periods of time.


STEPS TO REPRODUCE
0. It may be necessary to have the window borders visible via a color theme.
1. Build https://github.com/wolfpld/moderncore
2. Run iv
3. Switch between the iv window and any other window and observe iv window borders.


OBSERVED RESULT
See the attached image. There are two versions of the application there, "A" renders only when it needs to do so. "B" renders constantly.

Window "1" is when the application is doing a render loop (playing an image loading animation) and then stops. All looks fine there.

Windows "2" and "4" show how the window border looks after switching the focus to the window.

Windows "3" and "5" show how the window border looks after switching the focus away from the window.


EXPECTED RESULT
Code versions "A" and "B" should behave the same.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.5-arch1-1 (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION
The difference between the "A" and "B" code versions is in Viewport::Render() function, where the m_render early exit was commented out for the "B" version.
Comment 1 Zamundaaa 2025-11-06 14:42:45 UTC
Applications must react to configure events in a timely manner and then commit the surface (rendering if necessary) for things to work correctly, as decoration state changes are synchronized to the window configuration (most important with resizing, but also relevant with all other state changes).
Please report this to the application authors.