Summary:
This gives us XdgOutput support a requirement now that wayland server
reports that we support it and Qt5.12 then expects it to be sent.
It also provides an easy starting point for supporting wayland scaling
and a slight step towards multi-output.
Test Plan:
Ran on phone. Got output. Turning screen on and off works.
The double tap doesn't work great, but that was true before
(via bshah's hack to build on the current state)
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: romangg, nicolasfella, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18808
Summary:
Currently, KWin/Wayland crashes when the compositor is reinitialized.
The reason for that is ShellClient's DecorationRenderer gets destroyed
when the scene is already gone, thus there is no current OpenGL context.
Client works around that issue by destroying scene-specific DecorationRender
in finishCompositing. Such a workaround could be applied to ShellClient
as well, but it would make code more confusing because DecoratedClientImpl
also tries to destroy DecorationRenderer.
A better approach would be to notify DecoratedClientImpl that
compositing is about to be finished, so it can destroy the decoration
renderer when the scene is still alive. This not only fixes the
previously mentioned issue in ShellClient, but also makes code a little
bit tidier.
Test Plan:
Start Plasma on Wayland session, change any compositor settings (e.g.
animation speed).
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18921
Summary:
Some X clients acting as drag sources might try to optimize finding the current
target window by checking if a window manager, that sets the root window
_NET_CLIENT_LIST_STACKING property, is present. An example for this is Chromium
and since KWin sets the property the drag proxy windows must be added to this
list. Otherwise the origin client will not detect the proxy window and not send
an XdndEnter message.
Test Plan: Manually with Chromium.
Reviewers: #kwin
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15628
Summary:
On X several target atoms are established to provide data similar to the
text/uri-list target format (the respective MIME on Wayland is called
text/x-uri).
Firefox can send link data in the NETSCAPE_URL format ones. Chromium on the
other side sends link data in the text/x-moz-url format, which transports
UTF-16 text.
For both these peculiarities this patch provides converter functions, that
translate these formats into the Wayland native text/x-uri format. In the
other direction no translation is necessary. Both browsers supports the
text/uri-list format when receiving link lists.
Test Plan: Manually with Firefox and Chromium.
Reviewers: #kwin
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15629
Summary:
Building upon the generic X Selection support this patch establishes another
selection class representing the XDND selection and provides interfaces
to communicate drags originating from Xwayland windows to the Wayland
server KWin and drags originating from Wayland native drags to Xwayland.
For Wayland native drags KWin will claim the XDND selection as owner and
will simply translate all relevant events to the XDND protocol and receive
alike messages by X clients.
When an X client claims the XDND selection KWin is notified via the X protocol
and it decides if it allows the X drag to transcend into the Wayland protocol.
If this is the case the mouse position is tracked and on entering a Wayland
native window a proxy X Window is mapped to the top of the window stack. This
proxy window acts as a drag destination for the drag origin window and again
X messages will be translated into respective Wayland protocol calls. If the
cursor leaves the Wayland window geometry before a drop is registered, the
proxy window is unmapped, what triggers a subsequent drag leave event.
In both directions the necessary core integration is minimal. There is a single
call to be done in the drag and drop event filter through the Xwayland
interface class.
From my tests this patch facilitates drags between any Qt/KDE apps. What needs
extra care are the browsers, which use target formats, that are not directly
compatible with the Wayland protocol's MIME representation. For Chromium an
additional integration step must be done in order to provide it with a net
window stack containing the proxy window.
Test Plan: Manually. Auto tests planned.
Reviewers: #kwin
Subscribers: zzag, kwin, alexde
Tags: #kwin
Maniphest Tasks: T4611
Differential Revision: https://phabricator.kde.org/D15627
Summary: Adds an interface class to access Xwayland members from within KWin core.
Reviewers: #kwin, davidedmundson, zzag
Subscribers: zzag, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15419
Summary:
With the gneric X selections infrastructure and clipboard support the X
clipboard sync helper utility can be removed. Also rename its autotest as it
tests the inner workings of the new mechanism since this mechanism was
introduced.
Test Plan: Autotest still passes under new name.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15063
Summary:
In this patch an infrastructure is created to represent generic X selections
in a Wayland session and use them for data transfers between Xwayland windows
and Wayland native clients.
The central manager is the DataBridge class, in which Selection objects can be
created. This is hard-coded and such a Selection object persists until the end
of the session, so no arbitrary selections can be created on the fly. For now
the X Clipboard selection is supported, whose corresponding mechanism in the
Wayland protocol is just called Selection.
A Selection object listens for selection owner changes on the X side and for
similar events into the Wayland server interfaces. If a data provider is
available a selection source object is created by the Selection object. In case
data is requested on the other side, a data transfer is initialized by creating
a Transfer object. A Selection keeps track of all transfers and makes sure that
they are destroyed when they are finished or in case they idle because of
misbehaving clients.
The Clipboard class translates the X Clipboard via a proxy window. Selection
changes on the Wayland side are listened to through a new signal on the active
KWayland seat interface.
The previously used X clipboard syncer helper is disabled. The clipboard sync
autotest is changed to the new mechanism.
BUG: 394765
BUG: 395313
Test Plan: Manually and clipboard sync autotest.
Reviewers: #kwin
Subscribers: zzag, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15061
Summary:
By using the new Xwayland class we can reduce code duplication.
An abstract parent class is introduced, that allows interfacing
with the Xwayland class from the test binaries.
Test Plan: Autotests still pass.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15022
Summary:
The Xwayland code path is moved from ApplicationWayland to a dedicated class
Xwayland in a new top-level directory xwl.
This is a direct preparation step for generic support of Xwayland Selections.
On a longer timescale this should also allow us to further separate Wayland
native functionality from Xwayland to allow us at one point to build KWin's
Wayland binary optionally without X dependencies. Another long term goal, that
becomes possible through this separation is to recover from Xwayland crashes.
Test Plan: Manually and auto tests
Reviewers: #kwin, davidedmundson
Subscribers: davidedmundson, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15020
Summary:
Currently, the Desktop Grid effect tries to copy a client when user
moves it. But on X11 such behavior doesn't make sense because
a client can't be on multiple desktops (except on all).
BUG: 404442
FIXED-IN: 5.15.1
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19116
Summary: Required for kwin_wayland to find it's own plugin.
Test Plan: My kwin_wayland was crashing and gdb showed wrong plugin being loaded
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19010
Summary: it's a smaller library and provides everything we need
Test Plan: Compiles
Reviewers: apol
Reviewed By: apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19061
Summary:
The streaming buffer is shared so we have to reset it before rendering
something. Otherwise, it's basically undefined behavior.
For example, if the streaming buffer had been used for rendering a
geometry with some color, then the Background Contrast effect may crash
in GLVertexBuffer::bindArrays, it all depends on whether there is any
bounded GLShader. To fix that, the buffer has to be reset.
BUG: 356141
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19034
Summary: The header text is supposed to be the KCM's name, not a duplicate of the tooltip text.
Test Plan: {F6615111, size=full}
Reviewers: #vdg, GB_2
Reviewed By: #vdg, GB_2
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D19018
Summary: This is needed for remote desktop support. It also depends on D18114.
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18115
Summary:
Code that destroys all scene windows when finishing compositing is not
readable. E.g. can you tell what this piece of code is doing without
looking into the source code of Scene::windowClosed?
foreach (Client * c, Workspace::self()->clientList())
m_scene->windowClosed(c, NULL);
This change intoduces removeToplevel(as well its counterpart) method to
the Scene class. The name of the new method much better describes what
we're doing.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18210
Summary:
The configure button should be hidden because this effect doesn't
have any kcms.
Reviewers: #kwin, ngraham
Reviewed By: ngraham
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18984
Summary: It makes very less sense to show on the the mobile devices
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18978
Summary:
We have a mix of different doxygen comment styles, e.g.
/*!
Foo bar.
*/
/**
* Foo bar.
*/
/** Foo bar.
*/
/**
* Foo bar.
*/
/**
* Foo bar.
**/
To make the code more consistent, this change updates the style of all
doxygen comments to the last one.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18683
Summary:
Found better categories for GHNS v3: looks like only Aurorae is supported?
Also refresh the themes when you close the GHNS window, in case something was downloaded.
Test Plan: Open GHNS, download new theme, close GHNS -> new theme visible
Reviewers: leinir, graesslin, #kwin, davidedmundson
Reviewed By: leinir, #kwin, davidedmundson
Subscribers: ngraham, cfeck, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18935
Summary: In preparation for upstreaming to ECM, as qtbase needs this as well.
Reviewers: apol
Reviewed By: apol
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18944
Summary:
Given that allclips contains opaque regions of higher windows, we should
check PAINT_WINDOW_TRANSLUCENT flag instead of PAINT_WINDOW_TRANSFORMED.
ba39d1f917 introduced that check. Neither
the commit message nor the associated review have any comments regarding
checking PAINT_WINDOW_TRANSFORMED, so given the following comment
// Here we rely on WindowPrePaintData::setTranslucent() to remove
// the clip if needed.
PAINT_WINDOW_TRANSFORMED is most likely a typo.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18236
Summary:
If a Toplevel has scheduled layer repaints, then we have to copy them
to Deleted as well. This can happen, for example, when a client loses
shadow right before it gets closed or unmapped.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18786
Summary:
* Wrote new KCM based on KQuickAddons::ConfigModule.
* Remade QMLs for Buttons and Themes tabs.
* Updated bridge model code for new plugin lookup API (fixes warnings).
* Fixed decoration shadow changing messing with the previews sizes.
* Fixed button drag and drop issues (see D18104).
* Fixed default settings button behavior and detection of settings changes.
* Updated Get Hot New Stuff.
* Removed apply button in previewbridge.cpp: After applying changes, a theme's KCModule is invalidated.
BUG: 389431
BUG: 350122
BUG: 346222
BUG: 342816
BUG: 397595
{F6574963} | {F6574962} | {F6574961} | {F6574960}
Test Plan:
* Verified saving and loading for every setting
* Checked shadows of Breeze and Oxygen
* Tested all possible drag&drop operations on both sides of the fake titlebar
* Changed color schemes (with `kcmshell5 colors`) while showing the Themes tab to see if all previews update correctly their palettes
* Tested on a fresh Neon-developer account, via kcmshell and systemsettings
Reviewers: #vdg, abetts, ngraham, #kwin, davidedmundson
Reviewed By: #vdg, #kwin, davidedmundson
Subscribers: zzag, GB_2, ngraham, broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18458
Summary:
Lanczos filter shouldn't be in KWin core because it's quite specific about
rendering backend.
Test Plan: Windows in the desktop grid look normal.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: mart, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18774
Summary:
Glow textures already have the red, green, and blue channels
premultiplied by the alpha component (because of QImage), thus we can't
use GL_SRC_ALPHA for sfactor in glBlendFunc.
BUG: 403570
Test Plan:
Before:
{F6592391}
After:
{F6592392}
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D18803