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.
QuickSceneEffect can also be instantiated by C++, for example that's
the case with the overview effect. In that case, qmlContext() is not
going to return a valid context because the effect has not been created
by a QQmlEngine. In that case, use the root context as the parent
context.
https://doc.qt.io/qt-6/qhoverevent.html#oldPoshttps://doc.qt.io/qt-6/qhoverevent-obsolete.html#pos
oldPos: On QEvent::HoverEnter events, this position will always be QPoint(-1, -1).
pos: On QEvent::HoverLeave events, this position will always be QPoint(-1, -1).
On the same app, such as Wayland-enabled VS Code, the misgeneration causes the cursor to move to the origin when moving the cursor away from the server side decoration.
There are four usages of this overload, two of them are for the
intentionally disabled "Switch to Next/Previous Desktop" actions and the
rest are for "Switch One Desktop to X" actions. Due to the order they
were added, an empty keybind was set as the default and the actual
keybind is never enabled.
Now there's a QKeySequence argument to this overload, so an unexpected
empty keybind is never added. The two usages of addAction that depend on
this empty keybind behavior now pass in an empty QKeySequence.
BUG: 475748