Bug 464410 - Kwin lags when changing focus between windows
Summary: Kwin lags when changing focus between windows
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-17 13:26 UTC by Puspam Adak
Modified: 2023-01-17 21:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:
puspitaadak9876: X11+
puspitaadak9876: Intel+
puspitaadak9876: Mesa+


Attachments
Lag when changing focus from Qalculate (847.26 KB, video/mp4)
2023-01-17 13:26 UTC, Puspam Adak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Puspam Adak 2023-01-17 13:26:24 UTC
Created attachment 155378 [details]
Lag when changing focus from Qalculate

SUMMARY
Kwin on X11 lags a lot when changing focus between some windows. Maybe those windows do a lot of repainting when focusing/defocusing. This effect is more seen with GTK apps with the "Default" theme.
Also seen in the maximized System Monitor & System Settings apps which have several elements visible at once.
Interestingly, this does not happen on Wayland.
I have attached a video to demonstrate this issue. The lag doesn't seem to be much worse in my situation, but think, if an application has more GUI elements, then it can freeze up Kwin for a significant amount of time.

STEPS TO REPRODUCE
1. Open a GTK app such as Qalculate, System settings or System monitor, then maximize it.
2. Try opening any panel menu (to take away focus from the application).
3. See the animation lagging.

OBSERVED RESULT
Kwin lags & hence, the animations also lag.

EXPECTED RESULT
Kwin should not lag even if an application does some graphic-intensive task during focusing/defocusing.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.15.88-1-LTS (64-bit)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
In my opinion, this can be fixed if Kwin ignores the frames which do not come at the proper time from a particular window.