Since we now use an orthographic matrix as main projection matrix, the
glide and sheet effects don't really work as intended anymore. To fix
that, copy over the old perspective matrix and use that as base rather
than the current orthographic matrix.
It is quite a bit easier to reason about the conversion to device
coordinates when we actually have code that does that, instead of
implicitly assuming OpenGL handles it. Additionally, it means we don't
need to convert back to logical coordinates again when we're rounding
pixel values.
Rather than a perspective matrix, which is rather unexpected when coming
from something like QtQuick. Generally, when doing 2D you want an
orthographic matrix so Z values do not matter.
Apparently this was originally done for 3D effects, but there are only
two of those remaining (glide and sheet) and for those, the effects
themselves can set up a perspective projection matrix.
If we are using the software renderer
QQuickWindow::createTextureFromNativeObject returns null. We already
checking for kwin using GL compositing so we can expand to check
QtQuick's usage.
reconfigure is hooked up to a config watcher that is applicable on X11
and wayland.
A runtime check is added to reconfigure, if we're not initialised we
have nothing to reconfigure. initialise calls reconfigure at the end of
the method.
Since QPointF can have values that exceed INT_MAX, "distance <
minDistance" may not be triggered for the first output.
In order to make Workspace::outputAt() more robust to such extreme
cases, this patch changes the type of minDistance from int to qreal to
avoid truncation and adds an explicit check to initialize bestOutput
when we see the first workspace output.
It would be also great to add size hints sanitization code in kwin, but
it can be done later.
BUG: 460446
---
Should close:
* https://errors-eval.kde.org/organizations/kde/issues/321
* https://errors-eval.kde.org/organizations/kde/issues/341
When the slide effect paints a virtual desktop, it translates both
windows and the clip region.
Since the clip region slides too, the blur effect needs to be careful.
At the moment, the blur effect computes the blur region as follows:
- get the value of the blur region hint from client, map it to the
global coordinate space, and intersect it with the clip region
- apply translation and scale to the blur region
- pass the blur region to doBlur()
However, the translation transform must be applied before intersecting
the blur region with the clip region.
BUG: 460382
If the output is turned back on before m_turnOffTimer expires, the
dpms input event filter won't be reset and all input events will go to
the void.
BUG: 460322