This ports the nested wayland platform plugin to the InputDevice
abstractions.
Some global handling logic has been simplified to make porting more
straightforward.
The main motivation behind this change is to prepare input abstractions
for virtual input devices so the wl_seat can properly advertise caps or
the cursor getting properly mapped/unmapped when a fake pointer is
added/removed on a system without a hardware mouse connected.
With this, there are three abstractions - InputDevice, InputBackend, and
InputRedirection.
An InputDevice represents an input device such as a mouse, a keyboard, a
tablet, etc. The InputBackend class notifies the InputRedirection about
(dis-)connected devices. The InputRedirection manages the input devices.
Such design allows to unify the event flow for real and virtual input
devices.
There can be several input backends active. For example, the libinput
backend and an input backend that provides virtual input devices, e.g.
libeis or org_kde_kwin_fake_input.
If an output is disconnected, the Workspace will update the
Toplevel.output property for all windows that are on that output, then
it will call AbstractClient::checkWorkspacePosition() to fix window
position.
That may result in some windows partially sticking outside visible area
because AbstractClient::checkWorkspacePosition() has no idea what output
the window was.
This change addresses that problem by delaying updating the
Toplevel.output property so AbstractClient::checkWorkspacePosition()
could pick better window placement.
The role of enabledByDefaultMethod was misinterpreted. It exists only
for kcms so they can display undetermined state. EnabledByDefault should
still be set to a valid value.
Currently, if an output is hotplugged, all windows will be scrambled,
which is highly annoying.
With this change, windows will stick to their outputs if an output has
been connected or disconnected.
BUG: 296673
BUG: 378896
BUG: 412703
BUG: 443698
Currently, AbstractClient::geometryRestore() is abused to put windows
back on their original screen. It makes window placement more complex
and it breaks restoring initially maximized windows.
It looks weird given the kind of visualization where this text is
displayed.
Bad:
* XKB (required version >= 0.5.0), XKB API common to servers and clients., <http://xkbcommon.org>
Good:
* XKB (required version >= 0.5.0), XKB API common to servers and clients, <http://xkbcommon.org>
After the decoration is destroyed, we need to resize XdgToplevelClient
to ensure that the scheduled configure event will have correct size.
As is, xdg-toplevel configure events are delayed. When it's actually the
time to send a configure event, XdgToplevelClient will compute the
requested client size from the moveResizeGeometry().
If the moveResizeGeometry() still includes window decorations, the
window will get bigger.
BUG: 444119
For optimization purposes, kwin will ignore repaint regions scheduled by
invisible windows, e.g. hidden docks, minimized windows, etc.
The problem is that it sort of breaks w->addRepaintFull(). If a lot of
animation frames are dropped, for example due to heavy cpu load, the
sliding popups animation can jump from the middle of animation right up
to the end. It will schedule a repaint but it will be ignored.
In order to work around that issue, this change makes the sliding popups
effect schedule workspace repaints in postPaintScreen() to ensure that
the Scene will always repaint dirty regions.
Hopefully, this should fix bugs where auto-hide panels sometimes flicker
on Wayland.
BUG: 444502
Without spacing it is not immediately evident where a doc comment
ends and a new declaration begins. Adding a line of whitespace
makes everything more readable and easier to scan quickly.
Currently, input events can flow directly to input device handlers and
sometimes they go through the InputRedirection, which simply forwards
them to the corresponding input device handler.
In case the user has just the one display but they don't want to show it
in their main workspace when sharing video, allow creating a virtual
display.
This also will allow using remote devices as support displays.
The WindowThumbnail item uses the GLTexture class. In order to destroy
the thumbnail texture, the item will schedule a destroy job.
This means that the GLTexture can be alive during or after graphics
reset.
On the other hand, as an implementation detail, GLTexture::clear() may
allocate a framebuffer object, which is going to be destroyed together
with the last texture.
Given that window thumbnail textures can be still alive after a graphics
reset and the fact that GLTexturePrivate::s_fbo gets destroyed when the
last texture is destroyed, kwin can end up trying to clear a decoration
texture with now defunct s_fbo.
Since the old old s_fbo is inert, the glBindFramebuffer() function will
fail and the glClear() operation will affect the default framebuffer,
thus leading to black flickering visual artifacts.
In order to fix that issue, this change makes GLTexture destroy s_fbo
unconditionally in GLTexturePrivate::cleanup() which is called whenever
OpenGL stuff is about to tear down, e.g. due to graphics reset, etc.
BUG: 443951
Without this there can be a mismatch between what clients expect and what
KWin actually uses, causing for example stutter in video players.
BUG: 444303
FIXED-IN: 5.23.2