Recent-ish changes meant that the X11 window is kept alive whilst an
effect may be using the window.
This changes the lifetime of the sync alarm. This is problematic in the
case of an XWayland crash, we can assume whilst an X11 client is valid
the X11 connection is also valid, but if a close animation is used the
connection might not be valid when the destructor is called.
If a repaint is scheduled in the prePaintScreen() function, we want
it to be applied in the next frame, not the current one.
Currently, it doesn't work like this because prePaintScreen() runs first
then the Compositor gathers repaints and resets them.
This is important to qtquick effects that use qtquick3d as some items in
qtquick3d schedule repaints for the next frame after synchronizing, i.e.
in OffscreenQuickView::update() which is called in prePaintScreen() by
QuickSceneEffect.
Right now screenshots of windows always have drop shadows. This change
makes the shadows optional. Resolves a 7-year-old bug report in
conjunction with an incoming change to Spectacle.
BUG: 372408
The method is called quite often during KWins lifetime.
Because the pattern is constant, we can reuse the value instead of creating a new regex every time
We always know the data for the single pixel will fit into the buffer, so
it's unnecessary to use the checked variant (which is only available in
OpenGL 4.5)
On Wayland, options don't influence compositing as on X11. For example,
kwin cannot easily switch between compositing modes, etc.
One can still force kwin_wayland to reinitialize compositing by using
the dbus api.
It makes little sense to destroy effects if the animation speed changes.
The effects are written with the assumption that the animation time can
change and therefore they handle this case in reconfigure().
Amends 4d2c9f5d88.
Prior to 4d2c9f5d88, the Compositor used
to force the Options to reload settings when starting compositing.
Unfortunately it was overlooked that Options::animationTimeFactor() can
return an old value when the Options::animationSpeedChanged() signal is
emitted. This change addresses that.
Scripted and builtin effect metadata formats are no longer compatible.
So KPackageLoader doesn't list builtin effects anymore. To address that,
load builtin effect metadata manually.
At the moment, if an effect wants to have a configure button in the
desktop effects kcm, it needs to add X-KDE-PluginKeyword field with
its plugin id. This is confusing.
This change ports scripted effects to X-KDE-ConfigModule, which is more
intuitive than X-KDE-PluginKeyword.
kcm_kwin4_genericscriptedconfig is a special config module that loads
config.ui from KPackage. However, an effect can specify a different
config module in the metadata if kcm_kwin4_genericscriptedconfig doesn't
suit their needs.