At the moment, the wayland compositor has to handle the case of having
no workspace. This should be unnecessary and it creates a pesky cycling
dependency between Workspace and Compositor.
Given that the Workspace acts more like a container and kwin starts
accepting client connections after starting compositing, it's possible
to create the Workspace earlier and simplify the start() function a bit.
The main motivation behind this change is to encapsulate X11 compositor
implementation to the point that it can be moved from libkwin to
kwin_x11.
There are two options: either get rid of suspend and resume requests, or
add suspend and resume virtual functions in the Compositor. The apps
must definitely not rely on the dbus api, they must use the X11 api.
Compositing suspension api works only on X11 and it's quite obscure,
it's not used by any other KDE component.
So this patch goes for the most simplest option: dropping the requests.
The Shadow no longer owns the texture, so it can be loaded while
compositing is off.
This changes removes the compositing status check to simplify code.
This allows checking if the given override redirect is the composite
overlay window without resorting to platform specific implementation of
Compositor.
Currently, the Workspace is responsible for rerouting
X11Window::blockingCompositingChanged to
X11Compositor::updateClientCompositingBlocking(). It has a few issues:
if the client is initially blocking compositing, it's not going to work
as expected. The second issue is that it creates a coupling between
platform specific compositor implementation and generic Workspace. It's
a blocker for moving X11Compositor to kwin_x11 executable, etc.
implicit sync doesn't work properly with glFlush + KMS and llvmpipe doesn't support
EGL_ANDROID_native_fence_sync either, so we need to wait for rendering to complete
in a blocking fashion.
If somebody else claims the compositing selection, we definitely do not
want to stop compositing. It will also help with encapsulating
X11-specific code and splitting it out in the future.
Config loading is split in two groups: loading compositing config and
loading the rest. They are loaded separately at different times. Some
options are loaded in the Options constructor, some are loaded when compositing
starts, some are loaded when the Workspace is created. It's not easy to
keep track of what loads what and when.
This change simplifies option handling by loading all options in bulk
and decouples Options from OutputBackend and GLPlatform to ensure that
it can safely load options before kwin is fully operational.
Before 885e9acb6e
Application::processStartupEnvironment() returned
QProcessEnvironment::systemEnvironment() which means the current
environment of KWin when this function was called. By setting
InheritFromParent we can replicate this behavior.
This fixes KWin starting processes on X11.
The events we forward to the offscreen QML view are with our own
QPointingDevice instance, which has a devicetype of touch but a null pointerType.
In Qt5 this was enough, but pointerhandlers in qt6 refuse events with an undefined
pointertype, so we have to explicitly set it to finger
BUG:473541
If a transaction entry is removed, the graphics buffer reference will
be dropped and it's possible that the TransactionDmaBufLocker is going
to be destroyed as well.
If that happens, the transaction may remain in the locked state.