If the pointer constraint region is null, the input region must be used
instead. If the pointer constraint region is valid, it should be
intersected with the input region.
BUG: 457021
This reverts commit 7c91c4bad9.
It created regressions in some video games. After a closer look at the
pointer constraint region handling, there are some issues, but it might
be safer to fix them in master.
In meanwhile, let's revert 7c91c4bad because it breaks more things than
it fixes.
CCBUG: 457021
BUG: 469555
From the spec
On surface.attach requests to the pointer surface, hotspot_x
and hotspot_y are decremented by the x and y parameters
passed to the request. Attach must be confirmed by
wl_surface.commit as usual.
In practice, I don't think it matters that much as most toolkits use
wl_pointer.set_cursor to change the hotspot.
The SurfaceCursorSource assumes that the cursor surface has a wl_shm
buffer attached to it, which is a bad assumption, as the client can
attach a buffer of any type to the surface. Furthermore, the cursor
surface can have custom transforms applied to it, for example a
wp_viewport, which current code fails to handle.
The ImageCursorSource used to be primarily a porting aid. That is, if we
couldn't port some code to SurfaceCursorSource or ShapeCursorSource, the
ImageCursorSource was used in interim. Now, all parts of kwin have been
ported to ShapeCursorSource and SurfaceCursorSource, so the image cursor
source can be dropped.
Use CursorSource::image() instead.
Cursor caching in the ScreenCastStream has been changed so
QImage::cacheKey() is not being used. This is rather a preparation for
making kwin grab the contents of the cursor scene.
When GraphicsBuffer::dropped() is emitted, the buffer can be
unreferenced. If that's the case, the GraphicsBuffer will be deleted
twice: first in GraphicsBuffer::unref(), the second time in drop().
In order to address the issue, this change gets rid of the
GraphicsBuffer::dropped() signal, so it's always guaranteed that the
buffer stays alive until the reference count is checked.
The GraphicsBuffer::dropped() signal is used to remove the mapping
between wl_resource and ShmClientBuffer when the corresponding
wl_shm_buffer object is destroyed. On the other hand, we could perform
such cleanup when calling drop() too. This code can be further improved
by reimplementing wl-shm, which we need to do at some point in the
future.
Currently, the wayland backend does not monitor when its buffers are
released by the host compositor, which can potentially result in
glitches.
This change refactors the wayland backend so the swapchain buffers are
released upon receiving wl_buffer.release event.
wl_buffer.release event handling lives in the WaylandBackend. This
allows us to share some code, it might also be useful for implementing
direct scanout as any GraphicsBuffer providing dmabuf or shm attributes
can be wrapped in a wl_buffer.
Use a ToolButton rather than a Button for the close icon to reduce
unnecessary visual weight, and move it outwards so that its frame
touches the inner edge of the selection rectangle. Looks a bit nicer and
less attention-getting.
This makes it follow a common KDE convention of using bold text to
indicate which item in a set is active or current. Doing it here too
helps direct visual attention to the selected item, improving speed of
interaction.
Per https://invent.kde.org/plasma/plasma-desktop/-/issues/53, we're
making an overhauled version of the Thumbnail Grid Task Switcher the
default one in Plasma 6.
Currently the default Task Switcher is specified as the "Breeze" Task
Switcher which isn't ideal since it doesn't live in this repo, and it's
possible to use KWin without Plasma, where it does live.
So as a part of making Thumbnail Grid the new default Task Switcher,
let's also move it here so that KWin's default Task Switcher is always
available.
This commit grabs the Thumbnail Grid Task Switcher verbatim from where
it currently lives in the kdeplasma-addons-repo as of commit
54d16f44a56530854444b844536933a3107ef8a6.
BUG: 433034
FIXED-IN: 6.0
Currently the tablet cursor doesn't use SurfaceCursorSource because it
doesn't handle changing the surface size after the set_cursor request.
This change adds missing surface commit handling in the
SurfaceCursorSource so the tablet cursor can use it. As a side effect,
the pointer interface doesn't need to track surface commits anymore.