In the Overview effect, pressing the space bar doesn't always insert a
space character into the search field as one would expect; when the text
in the search field matches any windows, it instead activates the
highlighted window. At other times, it does insert a space as expected.
This behavior is unpredictable and unintuitive, so this commit fixes the
issue by intercepting the key input event and inserting a space when the
search field has focus. In this state, the highlighted window can be
activated using the enter/return key. When the search field doesn't have
focus, a press of the space bar will continue to activate the selected
window.
While tilt is sent on X11, we're currently only sending pressure events and not tilt/rotation events on Wayland. Since Krita is still running in X11, and it's running through XWayland - it's technically a Wayland client and gets no tilt/rotation. This fixes that issue :-)
I saw !3231 which was working on complete Wayland tablet support, but it's been stagnating. I just wanted tilt & rotation support now, so I added a way to query capabilities from the `m_capabilities` variable on the private interface we already fetched.
Tested on Krita using the Tablet Debug Log.
The size is used in NETRootInfo::setDesktopGeometry, which seems to cause
some applications to misbehave or even crash because they attempt to create
a texture larger than what the GPU supports
CCBUG: 461848
The widget was renamed a while back, but the KCM still used the old
term to refer to it when letting the user choose the visual effect that
it shows the user. Let's change that.
BUG: 463087
FIXED-IN: 5.27
gbm_bo_create_with_modifiers implies the GBM_BO_USE_SCANOUT flag, which
disables complex (tiled or compressed) formats that cannot be used for
scanout. This reduces performance. We don't need to scan out buffers
created for sceencasting/etc., so this is suboptimal.
By switching to gbm_bo_create_with_modifiers2, we can explicitly pass
the flags and avoid falling back to lower performance formats. Also add
a config check and fall back to the old version, to retain compatibility
with older mesa versions.
Since modifiers are listed in preference order, the last one is usually
the most general fallback. If we drop it, we risk winding up with no
usable modifiers.
On Apple GPUs with the Asahi driver, the received modifiers are usually
compressed, twiddled, and linear. Dropping linear means we only request
complex formats. But then gbm_bo_create_with_modifiers always requests
a scanout-capable BO which cannot support complex formats, and we wind
up with nothing. This breaks screencasting on these platforms.
The main motivation behind this change is to share rendering code
between windows and the cursor, specifically the Item class which
requires a Scene.
Note that Scene subclasses are responsible for issuing
ItemRenderer::renderItem() calls. The main reason for that is the
current architecture of the effects system, specifically we need to call
some effects hooks before and after painting a window.
eglSwapBuffers() used to flush rendering commands but now that we render
to dmabufs, we need somehow to flush the rendering commands to the dmabuf.
It fixes some of the weird rendering issues that I see sometimes.
The contents of the cursor can be either a normal image or a wl_surface.
At the moment, we get an image from the wl_surface. But it's going to be
changed so we use SurfaceItem to render wl_surface cursors.
SurfaceCursorSource provides the way to get the wl_surface handle from
the cursor. In order to provide backwards compatibility, it also provides
a QImage.
The damaged signal is wired to the KWaylandServer::Cursor::changed
signal to indicate when the cursor image changes, makes sense.
But it can create issues if you repaint cursor SurfaceItem when the
SurfaceInterface::damaged signal is emitted. There might be other
signals that we need to wait for to invalidate SurfaceItem's state.
The SurfaceInterface::committed is a better signal. When it's emitted,
the surface commit has been completed. Technically, it's different from
the damaged signal, but in practice they are equivalent. GTK and Qt
always damage the cursor surface.