If there's a pending move resize, Window::output() won't be updated
until geometry updated are unlocked. We need to use moveResizeOutput()
instead.
(cherry picked from commit 18870f67cc94573fadb6bccd46419c1ebc7ae949)
Buggy clients can commit the wl_surface several times in a row. On the
other hand, XdgToplevelInterface and XdgPopupInterface consider a
surface to be initialized if it has been configured. If the second
wl_surface commit comes before the configure event is sent, kwin will
initialize a toplevel or popup twice, which can trigger asserts.
BUG: 466530
(cherry picked from commit 43cac750343ad107ab92f29628cabb2a70a8d17f)
It's technically possible to keep it somewhat going right now and just
not send frames but it doesn't make much intuitive sense.
(cherry picked from commit 4cda16ce3a3ef914c28b3bf962f9da8cc9ca24ff)
Aurorae decoration plugin creates an unmapped internal window, it's not
rendered and so it's not added to the Workspace.
Internal window setups compositing in its constructor too. It means that
the WindowItem will have a link to the scene, but since the Compositor
has no any idea about the internal window yet, that scene can become a
dangling pointer, and kwin can crash when the window item is destroyed.
BUG: 466313
(cherry picked from commit 8fc634684c037dc0d88156d2dd076412989e6bc7)
Unmanaged windows are always in the stack now, so the else branch is not
needed, and in fact, it can produce undesired side effects if unmapped
window is closed.
(cherry picked from commit 298d63bc71a3d9b161849259c8309f677e77f939)
On X11, the painted screen is meaningless, so the zoom effect doesn't
use it to store offscreen data. It can create problems when iterating
over offscreen data map.
The painted screen can't be used to determine the necessary offscreen
texture size too. X11 requires some special care.
This change adds explicit wayland checks.
BUG: 466376
(cherry picked from commit 1854224c17db6df7b340d12f971ffddddbbe59c5)
Descriptor blocks are 18 bytes, the serial number one has space
for 13 bytes of serial number.
BUG:466136
FIXED-IN:5.27.2
(cherry picked from commit 693ea96599c76df03b522fa4f180edf2f4041526)
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.
(cherry picked from commit 711b6e36d2610fb4f693c87f50ad5fe71165ad9c)
Reserve enough of space for all vertices instead of dynamically
expanding the QVector to accommodate for new data.
(cherry picked from commit a62dc13161780cba827fc7ae4bc25b661f2bdfd7)
The projection matrix is constructed incorrectly, use the one provided
by the scene instead.
(cherry picked from commit 42cff94f722d08a8c40a818cdc835aa1dff880bf)
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'
(cherry picked from commit a60c3130e39e80289a5f62a6211f98a03043899e)
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
(cherry picked from commit 5f0ea95bfa0bba8cfd67d364fda7b108826c9db2)
...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
(cherry picked from commit 4fcc545628e6a1bce7bb6073e2aff9364f93d7a4)
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
(cherry picked from commit da26deaa5c843ef303ef9f1b9f0cd3d341c5c5f5)
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
(cherry picked from commit 520fa3042a9877379870af7b300fab7c669d7e7e)
WindowHeapDelegate used to have hidden property. It was renamed to
activeHidden, but WindowHeap has not been adjusted to the new name.
BUG: 466120
(cherry picked from commit bc0502b3cac939c5e75e63385dc9b4e2f32e9925)
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
(cherry picked from commit 01fd54d7538a1b8a9c954645142af699284d01d5)
If a new tile is added, make it inherit parent tile's padding to ensure
consistent padding.
BUG: 465842
(cherry picked from commit 18d6159be193f3267d258b28a7efa9ffd4e98d7c)
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
(cherry picked from commit edbbe996d33d17ae8020fb06611141586fd1e7bb)
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
(cherry picked from commit 81571203f12c3fbd8c7cb8bc6446587a43d3895b)
wl_fixed is lossy even for values that are representable as perfect doubles, 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
(cherry picked from commit 3082133117c4360d4ac9bc7500f4d2338f86e8d0)
Enforms thumbnails, screencasts and effects of these changes and
that the window needs repainting.
BUG:464417
FIXED-IN:5.27.1
(cherry picked from commit 264a19247bc081dfb4701509b1920a539e0b65bc)