When the software cursor leaves an output, its RenderLayer is marked
as invisible and the area corresponding to the layer is scheduled to
be repainted in the output layer. However, the composite function only
checks whether the root RenderLayer needs a repaint, not the output
layer too.
BUG: 479668
Accidentally pressing any shortcut shouldn't take down the whole session.
If KWin isn't reponsive but can still process shortcuts for some reason,
you can still switch to a different virtual terminal to explicitly kill
it from there
As we translate DRM_FORMAT_MOD_LINEAR to implicit modifiers + linear flag, the
egl import path should still work without implicit modifiers too.
BUG: 478921
gedit changes its caption from "Untitled document - gedit" to "gedit"
when it closes. This schedules Window::evaluateWindowRules() to be
called when the window is already marked as deleted. kwin then crashes.
In order to prevent that, a direct connection can be used instead. But
then the caption must be initialized extra carefully because if the
window rule changes the window type, "<N>" can be lost.
Its main purpose is to reroute surface size updates through SurfaceItem
so it can invalidate quads cache. Not all SurfaceItems currently discard
them when needed. When proper item transform support lands,
setDestinationSize() could also change the surface scale instead.
The wayland spec is not quite clear about the transforms, but the buffer
transform indicates a transform from wl_surface to wl_buffer or compositor
global coordinate space to composited buffer.
On the other hand, SurfaceItem assumes that the order is vice versa.
The render transform is applied first, after that, the texture is
flipped implicitly by opengl.
So in order to undo these transforms, we need to flip the image
vertically first, then undo the render target transform.
`flip-y | rotate-N` transforms are equivalent to `flip-x | rotate-N`.
However, it is not intuitive to express transforms that flip the y axis
via flip-x transforms. This change adds convenience aliases to improve
code readability and keep code intuitive, which is going to be needed in
order to drop TextureTransforms flags.
Return the resulting value immediately than use moveLeft(),moveRight().
It makes no difference for QRectF, but it might be nicer for QRect which
would need to recompute the right and bottom coordinates twice.
I wanted to do this refactoring for a while but didn't do it due to the
lack of test coverage.
These can be useful in case a QRect needs to be mapped. One could
convert the QRect into a QRectF and then back to QRect, but given that
these conversion helpers are present in rendering hot paths, it would
be great to be more efficient and also potentially loosing precision
because of floating point arithmetic.
Instead of checking for fullscreen windows and deciding whether or not to schedule repaints
based on that, check if the active window is refreshing fast enough to be reasonable for vrr.
For automatic mode, vrr is also enabled with the active window instead of the direct scanout
candidate.
BUG: 478680
BUG: 477199
When returning back from direct scanout to compositing, the whole frame
has to be repainted because the most recent buffer in the EGL swapchain
contains outdated contents now.
This change works around it by purging the DamageJournal when scanning
out a buffer. However, a nicer solution would be to assign a unique
sequence number to every frame and use that to index the entries in the
DamageJournal. It's a nicer design. With such absolute frame numbers,
the DamageJournal could properly detect discontinueties.
Given the final release is in close proximity, this change doesn't go
after such a refactoring.