For each DrmOutput a gbm_surface and EglSurface is created. When
rendering per screen the context is made current on each of the
surfaces.
Note: viewport handling needs to be improved by e.g. passing through
the scene to restore to correct viewport after dropping an FBO.
Furthermore it seems like buffer age is not working correctly in this
setup (not overly surprising).
Dynamic changes are not yet supported.
For each DrmOutput a set of buffers is created and presented. The
renderig is still in one go and not synced to the individual screens.
Dynamic changes are not yet supported.
The backend can indicate that the rendering needs to be split per screen.
In that case it has to provide a different rendering buffer per screen.
The painting in the scene is adjusted to either take a splitted path
or the existing path for all screens in one go.
Includes better error handling for when page flip failed. If it fails,
we shouldn't set the current buffer as otherwise each new attempt to
present a buffer will fail, too.
* blocks compositor while session is inactive
* prevents page flips while session is inactive
* restores modes when going to inactive
* hides cursor when going to inactive
* blanks screens when going active
* shows cursor again when going active
* triggers a repaint when going active
This change is motivated by the fact that we need to suspend libinput
before switching the virtual terminal. Also we don't want to take over
libinput if we do not have a VirtualTerminal created - in windowed mode
we don't want libinput to be started. So binding it to the backends which
create the VirtualTerminal makes sense.
The KWin::Application gains a new signal virtualTerminalCreated which is
emitted from VirtualTerminal once it's properly setup. This is used by
Input to create Libinput integration instead of binding it to logind.
Furthermore Libinput gets suspended when the VirtualTerminal reports that
it is no longer active. For re-activation we still just use logind's
session active property.
The DrmOutput corresponds to one output we perform mode setting on.
This implies that page flip is now performed on the DrmOutput. As our
compositor cannot drive multiple outputs yet, we only use the first one
and call into bufferSwapComplete and aboutToBufferSwap when either all
page flips are completed or respectivly the first one is performed.
Setting cursor is also handled on each DrmOutput.
When the DrmOutput is initialized it is blanked with a black buffer which
gets destroyed once the first page flip event has occurred (meanig the
buffer is no longer needed). Before setting the black buffer we store the
current buffer which will be set back on tear down. Because of that
tearing down the DrmBackend needs to wait till all page flips ended.
Creates two buffers with the size queried through the drm capabilities.
The actual cursor image is retrieved using the software cursor
functionality from the AbstractBackend and rendered into the shared
memory buffer. The the buffer is set as the new cursor image and the
rendering buffer for the cursor is swapped.
The position is updated whenever the cursor image changes or the mouse
position changes.
Uses EGL_MESA_platform_gbm to get an EglDisplay from a gbm_device.
The DrmBackend can provide a DrmBuffer for a gbm_surface and present
it.
Unfortunately buffer age seems to be slightly broken and we still have
artefacts.
Introduces a new (optional) dependency: libdrm.
The DrmBackend currently supports finding the first connected output.
It can create shared memory buffers which are used by SceneQPainter to
do double buffered rendering.
There is still lots to do, the following things are not yet working:
* multiple outputs
* page flip
* OpenGL (through gbm)
* restoring mode setting to start value
It needs to install the x11connection on the QApplication as it uses
kwinglobals.h internally. Same fix as already done for the KCM, see
305387ec3a.
Thanks to soee on #plasma for reporting the issue just in time to make
Riddell hold the release off.
When kdeglobals doesn't exist, QStandardPaths::locate() for it returns
an empty string, so the check in previous fix doesn't work in this case.
This change sets m_colorScheme properly in this case and also creates an
empty kdeglobals(needed because QFileSystemWatcher can't monitor
non-existing files) so kdeglobals can be reloaded if it is later
populated.
REVIEW: 123399
E.g. KSelectionOwner installs a native event filter and listens for
xcb events. Without that the KSelectionOwner::claim never succeeds and
for other X11 applications it will look like Compositing is not
supported.
This allows to start applications once kwin_wayland is started. E.g.
kwin_wayland --libinput --xwayland --framebuffer /usr/bin/startkde
Thus it would start startkde once both Wayland Server and Xwayland
are up and running and ready for connection. This resolves the problem
that prior to startup it is not known which will be the X11 display
variable. By passing the environment to the process by KWin this problem
is resolved.
If Xwayland goes down it's better to abort than staying alive. If
Xwayland goes down the next roundtrip to X (most likely during call
to xStackingOrder) will just freeze completely, which is kind of the
worst as one cannot VT-switch anymore. So a clean abort is a bad but
better solution.
Setting this means we get scaled screen geometry from Qt, and everything
becomes confusing when commmunicating with apps that might not have
this set.
As we use plasma units for UI everything is scaled anyway.
REVIEW: 123115