The main motivation behind this change is to unify render target
representation across opengl and software renderers and avoid accessing
the render backend directory in order to get the render target.
GLRenderTarget doesn't provide a generic abstraction for framebuffer
objects, so let's call GLRenderTarget what it is - a framebuffer.
Renaming the GLRenderTarget class allows us to use the term "render
target" which abstracts fbos or shm images without creating confusion.
With these two actions being separate, RenderLoop can record the time spent
in endFrame (for example for multi-gpu transfers) without risking also recording
blocking swapbuffer calls, and endFrame can later be moved to output layer
In the desktop grid effect, dragging an empty area of a desktop to
another desktop swaps all windows on the two desktops. This change makes
sure that this matches only windows in the current activity.
BUG: 386769
FIXED-IN: 5.24.5
When setting-up the plasma window interface we need to call
`setOnAllDesktops()` after the actual virtual desktops have
been set.
Otherwise, the current desktop would be always added to the
interface (as if the user were unsetting the "onAllDesktops"
flag) and the plasma interface and KWin can get un-synced,
specially if there are specific window rules.
BUG: 452171
FIXED-IN: 5.24.5
On x11 when multiscreen is enabled often kwin crashes on
laptop lid close, for two reasons:
* m_outputLayer going dangling in RenderLayer: fixed by using a QPointer
* m_activeOutput going dangling in Workspace
For the latter, the output disabling was done correctly, but x11client did set the old deleted output
again in X11Client::moveResizeInternal
This is fixed by moving desktopResized() at the bottom of
Workspace::slotOutputDisabled() after the reassign of outputs to
the toplevels
Reduce the code duplication and boilerplate to create and destroy
the test clients by making the related variables class members.
Handle special cases using an extensible flag mechanism.
In 5.24, the same code path is used for testing direct scanout, so that
causes false negatives. Generally though, the user setting shouldn't be
touched, it's not really proper feedback for the driver or KWin having
problems.
Some modes can have the exact frame timings but different flags.
Currently, the mode comparison function doesn't take that into account
which can result in the drm backend setting the current mode flag
incorrectly.
If no mode has the current flag set, the first mode object will be
announced twice.
There's also no benefit from sending the current mode as last. If the
current mode changes, the compositor will send the current_mode event,
not the mode event.
BUG: 452318
Since the Toplevel.output property is properly synchronized with the
frame geometry, Workspace::clientArea() can use the output property
instead of looking up the screen. It makes code intuitive and removes
unnecessary lookups.
Currently, if geometry updates are blocked, the Toplevel.output property
won't be updated. On the other hand, it's reasonable to use the output
property instead of manually looking up the output in window management
code, e.g. Workspace::clientArea().
In other words, using the Toplevel.output property is like walking on a
mine field, things can blow up. You can't use Toplevel.output even if it
makes perfect sense.
This change ensures that Toplevel.output property is always kept in sync
with the frame geometry. Unfortunately, this means that the output
property no longer can be updated when the frameGeometryChanged() signal
is emitted. It has to be done in moveResizeInternal() method.
If the blob is fetched while there is no kernel-visible reference to it,
the driver may re-use the blob ID. When DrmProperty is created or updated,
KWin holds a reference on the blob via drmModeObjectProperties, so this
should prevent any possible issues.
CCBUG: 449285
Using the global coordinate system when specifying output layer damage
regions would be very confusing. In order to make the coordinate system
comprehensible, use the layer-local coordinate system.
The infinite region is used to tell the Compositor when it needs to
repaint the entire layer.
In xdg_activation_v1, if a process fails to negotiate activation, at
least decorate it as demanding attention.
This will give apps ways to indicate attention is required. It can can also
help detect clients doing weird things.
Whilst a subsurface must have a parent at the time of creation, the
lifespan is not guaranteed afterwards.
It's a weird thing for a client to do, but we need to not crash
afterwards.
If the parent surface is destroyed we should consider the surface
unmapped.
BUG: 452044
In the current form any client committing multiple times without
attaching a buffer would unset the cached state and trigger an error.
It's legal (though weird) to commit multiple times before attaching a
buffer.
We should only reset the state if we commit an empty buffer after having
committed an existing buffer. This brings us in line with XdgShell.