Summary:
In preparation to support xdg-shell we need to make sure that ShellClient
does not assume m_shellSurface to not be null.
Everything that can be done through the surface() is resolved through
surface(). All accesses to m_shellSurface are nullptr checked.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1441
Summary:
Preparation for also supporting XdgShell. There will be different
ctors for ShellSurface and XdgShell, but most code needs to be shared.
Thus a dedicated init method is needed.
There is some restructuring in the init. All code depending on
ShellSurface being set is grouped and in an if block.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1440
Summary:
Makes use of new API in kwayland to expose shade state.
Depends on D1417.
Reviewers: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1418
Summary:
The cursor position is the reference KWin uses while moving a window.
If we don't warp the cursor position the window "jumps" to the cursor
position on first movement.
For requests triggered by the client (e.g. widget style) this does not
matter as the cursor is at the correct position. But for tools such as
task bars we should ensure the cursor is at the right pos.
Reviewers: #plasma, hein
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1421
Summary:
For one SceneQPainter is only used on Wayland and it can be created
through the Platform, so no different code pathes needed even if we
had SceneQPainter on X11.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1416
Summary:
KWin's plugins are now all in a plugins subdirectory. This is a good
argument to also move the window decoration plugins there. The name
clients was not really good anyway and makes it difficult for people
not familiar with the code base to find it. Having it under plugins
is the more expectable location.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1414
Summary:
The EglOnXBackend is no longer needed in the core. It's only needed by
the two x11 platform plugins. To best share it, it's moved into a common
directory and compiled into a static library which in turn is linked by
the two plugins.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1413
Summary:
It's only needed by the standalone x11 variant. This allows us to
simplify the creation of the OpenGLBackend: it's created by the
platform plugin - we don't need custom complex logic.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1392
So far if the Scene creation failed kwin_wayland went into a shutdown,
but didn't succeed because the thread to start Xwayland was already
running: it froze.
This change introduces a new signal in Compositor: sceneCreated. The
startup of Xwayland is bound to this signal. If it gets fired KWin can
startup Xwayland. If it does not get fired, KWin terminates correctly.
Summary:
If a window has an invalid size the decoration also has an invalid
size. This results in the texture used by the
SceneOpenGLDecorationRenderer to be invalid and being reset to null.
Of course we shouldn't try to use this texture to render to.
The change comes with a test case to simulate the situation. We cannot
simulate it with Wayland clients as the geometry can never be empty.
Thus we create an X11 client, resize it to an empty size and unmap it.
This is the first integration test case which creates an X11 Client!
It's also a test case which needs the OpenGL compositor. This will most
likely not work on build.kde.org yet - we need to see what to do about
it. Will need adjustments to get it at least skip on build.kde.org.
BUG: 361551
FIXED-IN: 5.6.3
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1383
Summary:
Mostly meant for multi-screen setups: we don't want that a strut set on
a window on screen 0 results in screen 1 completely being excluded. Even
if that's strictly seen a client bug, it's better to just ignore the
strut from KWin's side.
The sanity check is implemented in Client::adjustedClientArea.
From a pure standard point of view this change is a EWMH violation and
thus can cause regressions: struts by clients no longer working.
A test case for struts is added, including some invalid combinations
whose strut is ignored with this change.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1386
Summary:
KWin needs the plugin id of the breeze decoration plugin. Instead
of hard coding that it's now resolved through an optional dependency.
If the optional dependency is not available, the default is adjusted
to aurorae/plastik.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1344
By moving XRandrScreens the creation of screens gets simplified a lot
as there is no need to have windowing system specific init code. It all
just goes through the platform.
This also marks the point where the first X11 specific code is removed
from kwin_wayland.
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1355
kwin_x11 now also loads a platform plugin and initializes it.
It doesn't do much except loading it and init it. Though it's also
set up to continue startup only when screens are queried.
The plugin does not much. It's the most basic plugin we can have to
be loaded from kwin_x11.
Unlike the wayland platform plugins it gets installed to:
org.kde.kwin.platforms
Summary:
Source code reorganization:
The base class AbstractBackend got renamed to Platform, thus the
"backends" are "platforms" now. As they are plugins they should go
together with other KWin plugins which are nowadays in the folder
plugins.
So new location is plugins/platforms/
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1353
Summary:
It looks like something was forgotten here - there is
a completely empty body for an if statement that checks
whether the pointer is null.
So this might not be the desired way to fix this.
Should m_lastCreatedSettings be instantiated instead?
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1348
Summary:
It can be null even after updateTextTexture() if there is not text
to generate the texture from:
if (m_effectFrame->text().isEmpty())
return;
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1347
Summary:
From the rest of this method, it is obvious that m_topLevel can
be null in any part of the method - we are checking against it
being null in a few places in the method - both before and after
the affending lines.
Now, there is one place where the check is not applied, and
potentially calls ->window() on the null pointer.
p.s. If there are more places where kwin does clear_or_something(); return;
it could benefit from introducing on_scope_exit and similar tricks - see
Alexandrescu's 'Declarative control flow' presentation.
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1346
Summary:
This is the first change in a refactoring series. The aim is to:
* rename AbstractBackend to Platform
* move backends/ to plugins/platforms/
* don't bind platforms to Wayland only
* provide a platform plugin for "normal" X11
* share more code between X11 and Wayland
This change moves the platform/backend from waylandServer to Application.
The init of the plugin happens directly in the Application from the
KPluginMetaData. There is no need to externally init it and set the
parent.
WaylandServer::backend() currently just delegates to
kwinApp()->platform(), the idea is to drop this method completely.
The test infrastructure is also adjusted to this change.
Test Plan: kwin_wayland still works, all tests pass
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1331
This is more a hack than an actual implementation. It just renders
all sub-surfaces after the main window got rendered. But it does not:
* use window quads (e.g. splitting not supported)
* is not combined with rendering of the main surface
* does not support previous pixmap
Still it renders, which is the main goal at the moment.
The rendering is done in a recursive way. For updating the buffer an
important change is done: the buffer is copied into a new QImage on each
change and the differences are no longer painted. This is due to damage
region in a sub-surface tree being basically unknown.
This change introduces a tree for WindowPixmap. A WindowPixmap can
have a parent WindowPixmap and children. Each child represents a
SubSurface and references the buffer of that SubSurface.
The tree of WindowPixmaps is updated each time updateBuffer is called.
If there are new SubSurfaces new WindowPixmaps are created, for removed
SubSurfaces the old WindowPixmap gets removed. Also the ordering is
updated to reflect the current state.
This is currently rather expensive and should be changed to only rebuild
the tree if it actually changed.