Summary:
Using the Wayland protocol for OpenGL is no longer used or useful. KWin
internal windows only use OpenGL through QtQuick. We either have the
sharing context (KWin uses OpenGL for compositing) or we have the
QPainter compositor which also turns QtQuick to use software renderer.
Thus a situation where the Wayland platform context is useful doesn't
exist any more. Removing it helps getting the QPA plugin Wayland free.
Test Plan:
Run nested KWin triggering Outline once with OpenGL and once
with QPainter compositor.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19012
Summary:
So far we didn't try to do high DPI on kwin internal windows, such as
the user context menu and tab bars and whatever.
Due to wayland scaling they were the correct phyiscal size but upscaled.
This patch fixes our QPA to enable Qt's high-dpi support.
BUG: 402853
Note icons are still low res. This is because the global
QGuiApplication::devicePixelRatio which is the max of all connected
screens is static for the duration of the app. QIcon uses this when
determining the DPR to use. This will require a Qt change.
Test Plan:
Ran at 2x on my normal DPI screen (as that's easier to see anything)
* User action menu is high DPI
* Window deco tooltips are still fine
* Tab switcher is high DPI
* Overlay in present windows Desktop grid are still ok
Reviewers: #kwin
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18042
Summary:
Even though the buffer is passed through a side channel some properties
we might use are double-buffered on the surface commit.
Test Plan: Used by unit test InternalWindowTest::testScale in linked commit
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18085
Summary:
With the TabBox I observed the following issue:
1: trigger TabBox through screen edge
2: exit TabBox
3: trigger TabBox again through screen edge
Actual behavior: in step 3 the GUI does not show. If now using Alt+Tab
to show the TabBox the gui shows, but through screen edge it stays
broken.
Investigation showed that the difference is a direct show in screen edge
case and a delayed show in Alt+Tab case. Futher investigation shows that
an invalid geometry gets requested in the broken case. While this might
indicate an issue in another area it makes sense to protect KWin
internally against it and not to break rendering.
Thus this change ensures that a valid FBO does not get replaced by an
invalid sized FBO.
Test Plan:
Tested that Alt+Tab works correctly when triggered through
edge
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5438
Summary:
With this change KWin can create window decorations for internal windows.
Thus it's also possible to move internal windows and resize them which is
especially important for the debug console.
Reviewers: #kwin, #plasma_on_wayland, sebas
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2371
This is needed to make KWin build-able on non-Linux, but is actually
only a workaround. The dependency should also be available on non-Linux.
This disables the EGL integration in the Wayland backend (QPainter still
available) and the EGL fallback in the qpa plugin (preferred context
sharing still available, but requires a working OpenGL Scene).
REVIEW: 126202
ASAN righly complained: we need to delete our Wayland objects before
we destroy the internal client connection. Solved by better setting
parent relationships in the QPA plugin and correctly delete objects
in destroy of internal client connection.
We need to destroy the compositor after Xwayland terminated and after
the internal Wayland connection is destroyed. This means when destroying
the Workspace we may no longer destroy the Compositor at the same time.
Also we need to ensure that other tear down functionality doesn't call
into the no longer existing internal client connection.
With this change kwin doesn't crash when exiting with Wayland and/or
X11 windows still open.
This introduces an own QPA plugin for KWin. QtWayland's plugin is not
a good solution for KWin as QtWayland is meant for Wayland clients and
not for a Wayland server. Given that it makes more sense to have a very
minimal QPA plugin which supports the use cases we actually have.
With our own QPA plugin we should be able to improve the following
areas:
* no need to create Wayland server before QApplication
* Qt::BypassWindowManagerHint can be supported
* no workaround for creating OpenGL context in main thread
* sharing OpenGL context with Qt
* OpenGL context for Qt on libhybris backend
The plugin supports so far the following features:
* creating a QPlatformWindow using KWayland::Client (ShellSurface)
* creating a QPlatformBackingStore using a ShmPool
* creating a QPlatformOpenGLContext with Wayland::EGL
* or creating a QPlatformOpenGLContext which shares with KWin's scene
* creating a QPlatformScreen for each KWayland::Client::Output
* QPlatformNativeInterface compatible to QtWayland