There's the option "enable compositor on startup", but once composition is enabled in the current session there's no way to turn it off except by disabling that first option and login off. Most likely it would be better having that option as "enable composition" alone.
FYI, there's a configurable keyboard shortcut alt+shift+f12. Can you confirm your use-cases? Is it game performance?
It's just that, process wise, the extra step of having to log off seems wasteful.
As David said, Alt+Shift+F12 will do it on demand. FWIW games are supposed to inhibit compositing automatically. Cases where this doesn't happen are other bugs, most likely in those games themselves.
Doing it by a shortcut, and not by an option in the panel, is quite surprising.
Manually toggling compositing isn't the kind of thing that an average user ever care about, so offering a GUI way to do it would only offer them another way to shoot themselves in the foot. The option is there for people who really want it. "Simple by default, powerful when needed." :)
Not allowing toggling composition, but allowing all other kinds of things like the opengl version you use and the scaling technique? Sorry, I disagree. It's poorly designed.
Okay, that was easy: only re-enabling composition after 10 seconds of being non full-screen prevented 95% of glitches. Even better: done by checking the status of the current window without using polling, but interruptions. It seems that, as usual, I will be taking all the credit: https://gitlab.com/es20490446e/kwin-autocomposer/-/blob/master/root/usr/share/kwin-autocomposer/kwin-autocomposer
(In reply to Alberto Salvia Novella from comment #7) > It seems that, as usual, I will be taking all the credit: Excuse me good sir, so you have a license for an ego of this size?
By the way I have figured out an even better algorithm to do this. Now: - Entering or leaving full-screen instantly toggles composition. You can't even see the transition. - Composition isn't re-enabled if the full-screen window loses focus, till that window is closed. - Applications started as windowed don't automatically block composition when maximized, for example web-browsers. - No perceivable use of CPU or IO on the system monitor. The trick was simple: only re-test for full-screen if the last known full-screen window is no longer full-screen. Everything is done in memory for maximum performance, and only iterated on window focus change. Solving problems that no bunch of people were able to solve in the last 20 years, with a few lines, is the license of being awe. https://gitlab.com/es20490446e/kwin-autocomposer/-/blob/master/root/usr/share/kwin-autocomposer/kwin-autocomposer
If you feel that your work could be useful to others, feel free to upload it as KWin script on store.kde.org.
Umm, I don't know. I will think about that 🤔
You were right, much better as kwinscript. Thanks for the suggestion: https://store.kde.org/p/1502826/