When allocating offscreen texture, we should use screen's scale rather
than current render target's scale.
In addition to that, the cached vbo cannot be used for rendering on
other screens with different scale factors, which can happen.
This merges Window::clientMinimized() and Window::clientUnminimized()
signals with the Window::minimizedChanged() signal to simplify some
code.
The avoid animation flag has been dropped because its main usage is to
avoid playing animation during window initialization. But it's not possible
to trigger minimize animation at that moment. API-wise it's better to avoid
having such flags too and rely on surface role to decide whether to play a
given animation.
If setMinimized() is used during window initialization, no animation
will be played, so we could use setMinimized() instead of minimize()
that takes "avoid animation" boolean trap.
This signal exists as a convenience helper, but it's not always emitted
as it's advertised to work. Instead of fixing it, let's drop the signal
to simplify virtual desktop code. Its effects can be accomplished by
monitoring Window::desktopChanged() and VirtualDesktopManager::currentChanged()
signals in effects and scripts where needed.
It only gets set on specific cases and assumes false as default anyway.
kwin/src/backends/drm/drm_gpu.cpp:691:12: runtime error: load of value 190, which is not a valid value for type 'bool'
While we could still access the primary node, as we're not getting GPU acceleration
anyways we might as well fall back to CPU rendering directly
BUG: 466302
Instead of best-guessing, at BGR (which in retrospect was a bad guess),
offer whatever resembles most the internal representation. This way the
frame gets to be least treated as it goes into the client.
...before releasing the connection!
this was randomly causing crashes because of use-after-disconnect
problems. since we would tear down the connection in ~X11WindowedBackend
but outputs wouldn't get cleaned up until QObject children cleanup of
the X11WindowedBackend object (or more precisely the OutputBase). this
would then result in ~X11WindowedOutput accessing a backend connection
that had already been closed
to help debug this type of problem moving forward let's also reset the
connection to nullptr during destruction. it's kinda pointless but it
makes it easier to spot use-after-disconnect
BUG: 466183
This reverts commit 4b1ef33c1e.
It introduced a crash. The large icons task switcher can create and
destroy the shadow in the middle of painting. When a shadow is
destroyed, kwin can make opengl context current. It will reset current
QOpenGLContext, and QtQuick can crash.
BUG: 466279
The input events can be processed when the workspace is not available,
e.g. during startup or shutdown, so add a corresponding guard.
As a long term plan, we need to decouple Workspace from low-level input
backend parts, but it will be a too invasive change for now.
BUG: 449317
BUG: 465456
Checking if the pointer needs to be confined before doing `std::clamp` on
the position is useless and causes problems. With this change, the pointer
will always be confined to exactly the screen, without any fractional offsets.
BUG: 461911
Currently the Shadow class is scene specific, which adds coupling
between Window and scene bits.
This change introduces ShadowTextureProvider that contains scene
specific stuff so the Shadow acts like a data source and is not coupled
to concrete scene.
It's gone in KF6
It's only used to obtain the install location of the package and resolve files relative to that
Use QStandardPaths to locate those files directly
Aurorae uses a QQuickWindow that receives an implicit scale through the
QPA. Unfortunately there's a known quirk with device pixel ratio not
being followed when offscreen surfaces are never shown and an
independent render control is used.
Without this QQuickRenderControl::grab ends up using a buffer the size
of the window * dpr, but with the contents rendered at 1x in the corner
along with incorrect device pixel ratio information.
This patch copies a used solution from EffectQuickView. This can be
resolved more neatly with newer Qt.
BUG: 452730
BUG: 465790
Since normal geometry is now rounded, we need to make sure to round
anything that should match that geometry, otherwise we risk things
peeking out of the normal geometry.
BUG: 464526
Before this commit, the device pixel ratio of the cursor was set to ignore
the Xwayland scale override, while the size of the cursor surface was scaled.
This change removes the scaling of the cursor surface size, to make the cursor
be no longer cut off in rendering.
BUG: 466094
Converting to wl_fixed is lossy. Especially for non-round values like 1.15.
This causes various visual glitches and off sizes.
Given we're using units of 120ths for the fractional scale protocol it makes sense
to fix the passed values for anything else over the wayland protocol.
BUG: 465850
Testing done:
ran a 1920 screen at 1.15 scale, got a logical size of 1670 which matches what it should be