Summary:
This gets rid of the dark area that may appear between very different colors by doing the blur in SRGB colorspace.
This is not enabled for GLES, and will use the previous blur type.
Test Plan:
Before:
{F6577457}
After:
{F6577458}
Reviewers: #vdg, #kwin, davidedmundson, zzag, fredrik, ngraham
Reviewed By: #vdg, fredrik, ngraham
Subscribers: Codezela, fredrik, abetts, Petross404, rapiteanu, filipf, rooty, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18377
Summary:
This is only relevant on Qt and when WlShell is used.
This was only the case before Qt5.10.
We will depend on Qt5.12 next release.
Static Qt builds which are that old typically wouldn't contain QtWayland
Test Plan: Compiles. Not used in tests
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18594
Summary:
When we create a new Shellclient there may be a pending relevant
interface.
For every other case this is handled in WaylandServer, the class
responsible for attaching new interfaces at runtime.
The only exception is ServerSideDecorationInterface which is handled in
the ShellClient constructor.
This makes everything consistent.
No behavioural changes.
Test Plan: Ran unit tests
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18592
Currently, if a Wayland surface registers a frame callback but does
not send a damage event, the callback will not be serviced even after
KWin has completed a compositing cycle and is therefore ready to
render a new frame for the surface. Since some clients, including any
using NVIDIA's Wayland EGL implementation, wait for frame events
before preparing each frame this behavior can result in hangs if a
compositing cycle occurs between registering the frame callback and
sending the damage event.
Instead, in accordance with the Wayland specification, frame callbacks
should be serviced (via KWayland::Server::SurfaceInterface::frameRendered)
for all visible windows - not just those damaged since the last
compositing cycle.
Summary:
XdgShell and WlShell behave very differently when it comes to switching
from normal to maximised to fullscreen and back. Under XDGShell they are
2 properties, under WlShell it's a tristate enum.
This test was testing something very specific under WlShell and then
became a horrid mess of if statements doing different things and testing
different things, especially after XdgShell got proper configure
handling.
This patch splits it into two methods.
Test Plan:
Ran test
Passed
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18589
Summary:
So far the ThumbnailItem in TabBox mode used the window id for finding
the window it should render a thumbnail on. In the Wayland world this is
not unique. The window id could be either an X11 window or a wayland
window. We don't guarantee that there are no conflicting ids.
With the internal id we have a way to properly identify the windows, so
this element should use them.
To support this the property changed the type to QUuid and the
clientmodel also provides the QUuid. As in TabBox the way to get the
window is through the model this should be compatible for all themes.
It's tested and verified with the Breeze switcher.
For declarative KWin scripts the ThumbnailItem also provides the
AbstractClient as a property, so there should not be any script which
uses wid. If it does, this could break, but well the script should use
the intended API.
Test Plan: ctest passes, manual testing of Breeze alt-tab switcher
Reviewers: #kwin
Differential Revision: https://phabricator.kde.org/D18405
Summary:
KWindowSystem provides a plugin interface to have platform specific
implementations. So far KWin relied on the implementation in
KWayland-integration repository.
This is something I find unsuited, for the following reasons:
* any test in KWin for functionality set through the plugin would fail
* it's not clear what's going on where
* in worst case some code could deadlock
* KWin shouldn't use KWindowSystem and only a small subset is allowed
to be used
The last point needs some further explanation. KWin internally does not
and cannot use KWindowSystem. KWindowSystem (especially KWindowInfo) is
exposing information which KWin sets. It's more than weird if KWin asks
KWindowSystem for the state of a window it set itself. On X11 it's just
slow, on Wayland it can result in roundtrips to KWin itself which is
dangerous.
But due to using Plasma components we have a few areas where we use
KWindowSystem. E.g. a Plasma::Dialog sets a window type, the slide in
direction, blur and background contrast. This we want to support and
need to support. Other API elements we do not want, like for examples
the available windows. KWin internal windows either have direct access
to KWin or a scripting interface exposed providing (limited) access -
there is just no need to have this in KWindowSystem.
To make it more clear what KWin supports as API of KWindowSystem for
internal windows this change implements a stripped down version of the
kwayland-integration plugin. The main difference is that it does not use
KWayland at all, but a QWindow internal side channel.
To support this EffectWindow provides an accessor for internalWindow and
the three already mentioned effects are adjusted to read from the
internal QWindow and it's dynamic properties.
This change is a first step for a further refactoring. I plan to split
the internal window out of ShellClient into a dedicated class. I think
there are nowadays too many special cases. If it moves out there is the
question whether we really want to use Wayland for the internal windows
or whether this is just historic ballast (after all we used to use
qwayland for that in the beginning).
As the change could introduce regressions I'm targetting 5.16.
Test Plan:
new test case for window type, manual testing using Alt+Tab
for the effects integration. Sliding popups, blur and contrast worked fine.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18228
Summary:
For some reason this lines are duplicated twice, (possibly due to merge
conflict resolution?), clean it up.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18348
Summary:
The new connect syntax has several advantages over the old syntax:
(a) Connecting with the new syntax is faster;
(b) It is compile time checked.
There are still a few places where the old connect syntax is used, e.g.
connecting to QML buttons in the Desktop Grid effect.
Test Plan:
Have been testing this patch for ~2 weeks, haven't noticed any
regressions.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, broulik, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18368
Summary:
Wayland provides functionality for servers to acquire an unused socket name
automatically. Do this through the recently added functionality in KWayland
in case no socket name was specified as an argument to KWin.
Test Plan: Manually, autotests pass.
Reviewers: #kwin, fvogt
Reviewed By: fvogt
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18522
Summary:
The plasma virtual desktop protocol states the following about
the done event
> This event is sent after all other properties has been sent after
> binding to the desktop manager object and after any other property
> changes done after that.
Thus we have to send that event when the number of rows has been changed.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18518
Summary:
The protocol is double buffered, after changing the name done should be
sent so that clients update.
Test Plan:
Changed a VD name on wayland
Pager tooltip updated
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18513
Summary: New icons were added in D18483 and D18490, so this is 5.16 only.
Test Plan: {F6565234, size=full}
Reviewers: #vdg, #plasma, ndavis
Reviewed By: #vdg, ndavis
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18492
Summary:
We have to connect to nameChanged even if m_rootInfo is not set yet,
otherwise names in _NET_DESKTOP_NAMES won't be kept in sync if
a virtual desktop is renamed.
CCBUG: 403307
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18503
Summary:
Default CXX flags are out of our control. Whether they're set by the
compiler or the user or ECM.
We currently disable for clang. This patch also disables this warning
for other compilers.
This might not be anyone's first preference, but we're at an impasse
there.
Test Plan: Compiled
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18488
Summary:
Mesa requires XESetWireToEvent xlib callbacks to be called
when DRI2 is used. This is done by the GLX integration in
the Qt's xcb plugin, but Qt 5.12 initializes the GLX integration
only when required, e.g. when a window with OpenGL support is
created or when availability of OpenGL is checked.
So force initialization of the GLX integration by calling
QOpenGLContext::supportsThreadedOpenGL().
https://codereview.qt-project.org/#/c/6557/https://bugzilla.opensuse.org/show_bug.cgi?id=1120090
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: davidedmundson, graesslin, fvogt, filipf, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18366
Summary: Uses D17691 and sets the info on the protocol
Test Plan: correct data sent
Reviewers: #plasma, #kwin, zzag
Reviewed By: #plasma, #kwin, zzag
Subscribers: zzag, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18293
Summary: We depend on Qt 5.11, thus we can address the TODO item.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18355
Summary:
We need to connect to PlasmaVirtualDesktopInterface::activateRequested
when a virtual desktop is created, otherwise one won't be able to
activate the desktop by using the pager.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18342
Summary:
Currently, there are several issues with
VirtualDesktopManager::createVirtualDesktop:
(a) The method expects the number parameter to be in range [1, count + 1],
but we pass [0, count];
(b) It doesn't correctly update X11 desktop numbers.
This change tries to address all previously mentioned issues.
BUG: 403312
FIXED-IN: 5.15.0
Test Plan: No longer able to reproduce bug 403312.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, hein, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18328
Summary: Connecting with the new syntax is faster and also type checked.
Test Plan: Scripted effects still work as expected.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18393
Summary:
Currently, when the lanczos filter attempts to release acquired resources,
the backend is already gone. To fix that we have to destroy the filter
together with SceneOpenGL2. At that moment the backend is still alive.
BUG: 403370
FIXED-IN: 5.15.0
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18367
Summary:
EffectsAPI explicitly says:
"On X11, the window will end up on the last window in the list" and
DesktopGrid reliaed on that.
Using the last makes sense as it means the
enterDesktop method will work for both.
Somehow in the refactors AbstractClient ended up doing the opposite.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18339