Commit graph

16818 commits

Author SHA1 Message Date
Roman Gilg
548978bfe1 [xwl] Drag and drop between Xwayland and Wayland native clients
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
2019-02-19 13:09:18 +01:00
Roman Gilg
ad1bcbecc7 [xwl] Add Xwayland interface class
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
2019-02-19 12:59:11 +01:00
Roman Gilg
2776f829ef Remove X clipboard sync helper and rename its autotest
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
2019-02-19 12:30:43 +01:00
Roman Gilg
6e08fb2fa5 [xwl] Generic X selections translation mechanism with Clipboard support
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
2019-02-19 12:24:27 +01:00
Roman Gilg
608a89a85b [autotests] Use Xwayland class in WaylandTestApplication
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
2019-02-19 12:18:33 +01:00
Roman Gilg
050cf0451e [xwl] Move Xwayland parts into separate class
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
2019-02-19 12:10:46 +01:00
Vlad Zagorodniy
58de7d6862 Merge branch 'Plasma/5.15' 2019-02-18 16:27:45 +02:00
Vlad Zagorodniy
55d3f2933f [effects/desktopgrid] Don't copy windows on X11
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
2019-02-18 16:27:13 +02:00
Martin Flöser
1d8d7bd9f7 [qpa] Set binary output path for QPA plugin
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
2019-02-17 20:09:23 +01:00
l10n daemon script
0015ff2ac6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-17 08:30:42 +01:00
l10n daemon script
71acd12eb2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-17 05:37:27 +01:00
Albert Astals Cid
76c5371b57 Link to AuthCore instead of Auth
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
2019-02-16 10:20:28 +01:00
l10n daemon script
66e7212a4b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-16 05:46:17 +01:00
Vlad Zagorodniy
0d7415336f [effects] Make sure that all effects reset the streaming buffer
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
2019-02-15 15:51:54 +02:00
l10n daemon script
b5b4cff18c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-15 09:22:45 +01:00
l10n daemon script
6d9ac76cf7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-15 05:42:11 +01:00
Nate Graham
c55568fd80 [kcmkwin/decorations] Use correct header text
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
2019-02-14 10:33:54 -07:00
Jan Grulich
b4a8977b3a Add support for fake pointer move with absolute coordinates
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
2019-02-14 13:47:36 +01:00
Vlad Zagorodniy
d167935157 Add addToplevel and removeToplevel to Scene
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
2019-02-14 14:43:11 +02:00
Vlad Zagorodniy
96a02c7560 [effects/logout] Hide configure button in Desktop Effects KCM
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
2019-02-14 13:45:30 +02:00
l10n daemon script
87917677d6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-14 05:43:32 +01:00
Bhushan Shah
051539606c [kcmkwin/kwindesktop] show only on desktop
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
2019-02-13 17:07:04 +05:30
l10n daemon script
beb35d8b8f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-13 05:59:41 +01:00
Vlad Zagorodniy
7b20e1f66f Overhaul doxygen comments
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
2019-02-12 19:29:33 +02:00
Valerio Pilo
31dcf51c88 [kcmkwin/kwindecoration] Fix Get Hot New Stuff
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
2019-02-12 16:21:11 +01:00
David Edmundson
5fa18646b6 [autotests] Fix typo in autotest name 2019-02-12 12:38:35 +00:00
Volker Krause
d920b323bd Follow ECM documentation style
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
2019-02-12 11:56:21 +01:00
David Faure
1b316b6b69 Merge branch 'Plasma/5.15' 2019-02-12 08:56:17 +01:00
David Faure
48971e0848 Enable -DQT_NO_URL_CAST_FROM_STRING and fix compilation 2019-02-12 08:54:53 +01:00
l10n daemon script
3e09342c5e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-12 05:48:29 +01:00
Victor Ruzhykh
0cf7cca2ab Make the new Window Decoration KCM translatable
Differential Revision: https://phabricator.kde.org/D18931
2019-02-11 20:12:41 +02:00
Vlad Zagorodniy
5047449a55 [platforms/drm] Use more ScopedDrmPointer
Test Plan: Standalone KWin/Wayland still works.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18863
2019-02-10 20:26:02 +02:00
Vlad Zagorodniy
6006dab41c Use correct flag when checking whether a scene window is opaque
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
2019-02-10 20:05:45 +02:00
Vlad Zagorodniy
22cdf08956 Merge branch 'Plasma/5.15' 2019-02-10 20:01:59 +02:00
Vlad Zagorodniy
381d0df7f9 Copy layer repaints to Deleted
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
2019-02-10 20:01:40 +02:00
Valerio Pilo
8350c0f2ce [kcmkwin/kwindecoration] Rewrite the KWin decorations settings as a ConfigModule
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
2019-02-10 13:01:04 +01:00
Vlad Zagorodniy
698b40dbbd [kcmkwin/compositing] Delete unused config headers
Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, ngraham

Reviewed By: #kwin, davidedmundson, ngraham

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18850
2019-02-08 17:27:25 +02:00
Vlad Zagorodniy
be8729105f Move lanczos filter away from KWin core
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
2019-02-07 18:03:34 +02:00
Jonathan Riddell
5a750c3667 Update version number for 5.15.0
GIT_SILENT
2019-02-07 11:01:16 +00:00
Vlad Zagorodniy
16a2799b3a Merge branch 'Plasma/5.15' 2019-02-07 02:11:14 +02:00
Vlad Zagorodniy
bdddf4daf2 [effects/screenedge] Use correct blend function
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
2019-02-07 02:10:57 +02:00
Vlad Zagorodniy
261e3a768a Make whitespace in Deleted consistent 2019-02-06 19:16:18 +02:00
Vlad Zagorodniy
e81bbfb086 Remove unused field in Deleted
We don't need window_opacity because 92d06a8c4b
introduced m_opacity a while ago.
2019-02-06 19:15:49 +02:00
l10n daemon script
54e46dbd9f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-06 08:36:52 +01:00
l10n daemon script
d0fc39cbf0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-02-06 05:46:34 +01:00
Vlad Zagorodniy
6481607565 Remove ExtraDesktop.sh
Summary: data/fsp_workarounds_1.kwinrules had been removed a while ago.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18775
2019-02-06 01:33:11 +02:00
Vlad Zagorodniy
b06c1ea5a4 Move icons to data dir
Summary: We don't need them in the toplevel directory.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18771
2019-02-06 01:19:54 +02:00
Vlad Zagorodniy
b40c702c76 Drop COPYING.DOC
Summary: KWin is licensed under GPLv2.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18657
2019-02-05 23:41:57 +02:00
Vlad Zagorodniy
920831bb8e Merge branch 'Plasma/5.15' 2019-02-05 14:32:41 +02:00
Vlad Zagorodniy
c372585623 Fix --no-global-shortcuts option
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18643
2019-02-05 14:32:14 +02:00