Commit graph

16742 commits

Author SHA1 Message Date
Vlad Zagorodniy
bd15c1185d Trim whitespace 2019-01-28 02:28:48 +02:00
Martin Flöser
07e394fbb7 Fix unused param warning
Sorry for introducing them.
2019-01-27 14:03:53 +01:00
Martin Flöser
cfecb1e077 Fix reorder warning in AbstractScript
Summary:
scripting/scripting.h:205:13: warning: ‘KWin::AbstractScript::m_pluginName’ will be initialized after [-Wreorder]
     QString m_pluginName;
             ^~~~~~~~~~~~
scripting/scripting.h:204:13: warning:   ‘QString KWin::AbstractScript::m_fileName’ [-Wreorder]
     QString m_fileName;
             ^~~~~~~~~~
scripting/scripting.cpp:230:1: warning:   when initialized here [-Wreorder]
 KWin::AbstractScript::AbstractScript(int id, QString scriptName, QString pluginName, QObject *parent)
 ^~~~

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18560
2019-01-27 13:25:40 +01:00
Martin Flöser
2608026b88 Silence warnings in TabBoxHandler
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18406
2019-01-27 13:25:24 +01:00
Martin Flöser
932ccb2ac3 Switch ThumbnailItem to internal uuid instead of WId
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
2019-01-27 09:52:15 +01:00
Martin Flöser
02a0561016 Add windowsystem plugin for KWin's qpa
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
2019-01-27 08:59:58 +01:00
Bhushan Shah
ef510b4e76 remove superfluous code
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
2019-01-27 12:05:22 +05:30
Vlad Zagorodniy
253ff428a7 [effects] Port to new connect syntax
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
2019-01-26 01:22:06 +02:00
Roman Gilg
4729a42c34 Name Wayland socket automatically when no socket name was specified
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
2019-01-25 13:38:54 +01:00
Vlad Zagorodniy
260fa71d5d Send done event after the number of rows has been changed
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
2019-01-25 14:07:07 +02:00
David Edmundson
7762da7622 Merge branch 'Plasma/5.15' 2019-01-25 10:35:17 +00:00
David Edmundson
f3c1786a89 [wayland] Send VirtualDesktop::done after editing a property
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
2019-01-25 10:33:24 +00:00
l10n daemon script
433a121838 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-01-25 08:42:24 +01:00
l10n daemon script
fcb45426a9 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-01-25 05:40:11 +01:00
Nate Graham
1d706d96e5 [kcmkwin] Use new icons for virtual desktops, touch screen, and screen edges KCMs
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
2019-01-24 14:42:33 -07:00
David Edmundson
d4fce7a3ad Separate clang and gcc compiler workarounds for kwin override policy 2019-01-24 16:51:09 +00:00
Vlad Zagorodniy
5c18b6d76c Merge branch 'Plasma/5.15' 2019-01-24 18:35:51 +02:00
Vlad Zagorodniy
8fd0418187 Keep _NET_DESKTOP_NAMES in sync
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
2019-01-24 18:30:15 +02:00
David Edmundson
a088a7b1a4 Apply -Wno-inconsistent-missing-override for all compilers
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
2019-01-24 16:28:27 +00:00
l10n daemon script
45719a25db 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-01-24 08:34:15 +01:00
Nate Graham
4f69dc6833 [kcmkwin/compositing] Use new icon for Effects KCM
Summary: Use the new icon introduced in D18457

Test Plan: {F6563102}

Reviewers: #vdg, davidedmundson, GB_2

Reviewed By: #vdg, davidedmundson, GB_2

Subscribers: Codezela, GB_2, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18461
2019-01-23 20:02:36 -07:00
Marco Martin
94e09947f2 Set rows in virtualdesktop protocol
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
2019-01-22 15:22:56 +01:00
Vlad Zagorodniy
7ddd5afe64 Merge branch 'Plasma/5.15' 2019-01-21 20:11:38 +02:00
Vlad Zagorodniy
7477a411ae Fix "context objects" in VirtualDesktopManager::setVirtualDesktopManagement
Summary: Just to make "lifetimes" more cleaner.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18374
2019-01-21 20:08:38 +02:00
Vlad Zagorodniy
47e9e52df3 Set desktop name "atomically" when using the plasma virtual desktop protocol
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18373
2019-01-21 20:08:28 +02:00
Vlad Zagorodniy
bae21154ea Generate desktop ids without curly braces
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
2019-01-21 20:08:17 +02:00
Vlad Zagorodniy
737bb2ec86 Make sure that new virtual desktops can be activated by using plasma virtual desktop protocol
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
2019-01-21 20:08:06 +02:00
Vlad Zagorodniy
7274aed544 Fix VirtualDesktopManager::createVirtualDesktop
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
2019-01-21 20:07:55 +02:00
Vlad Zagorodniy
cd0f954ab1 [libkwineffects] Port AnimationEffect to new connect syntax
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
2019-01-20 14:04:13 +02:00
Vlad Zagorodniy
6740db7a6c [autotests] Use unloadAllEffects
Test Plan: The tests still pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18383
2019-01-20 13:52:30 +02:00
Vlad Zagorodniy
8877dff715 [autotests] Update tests to use stable version of xdg-shell
Test Plan: All tests pass.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18292
2019-01-20 13:52:30 +02:00
Vlad Zagorodniy
a1e5650fd0 Merge branch 'Plasma/5.15' 2019-01-18 23:52:29 +02:00
Vlad Zagorodniy
fbb30bb863 Delete names of removed desktops from kwinrc
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18372
2019-01-18 23:50:18 +02:00
Vlad Zagorodniy
95ccb6c170 Merge branch 'Plasma/5.15' 2019-01-18 21:42:07 +02:00
Vlad Zagorodniy
253f954e31 [scenes/opengl] Destroy the lanczos filter when the backend is still alive
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
2019-01-18 21:41:48 +02:00
Vlad Zagorodniy
2458b95e8c Remove executable bit from presentwindows.cpp 2019-01-18 21:16:41 +02:00
Heiko Becker
ad5700b812 Merge remote-tracking branch 'origin/Plasma/5.15' 2019-01-18 14:49:43 +01:00
Heiko Becker
79eeea6b58 [build] Search for kirigami as a runtime dependency
Test Plan: cmake lists kirigami as a found dependency

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18359
2019-01-18 14:48:08 +01:00
Vlad Zagorodniy
392c2b878e Merge branch 'Plasma/5.15' 2019-01-18 15:46:42 +02:00
Vlad Zagorodniy
204a05fef8 Compile the virtual backend with older Mesa
Summary:
BUG: 403326
FIXED-IN: 5.15.0

Test Plan: N/A

Reviewers: #kwin, fvogt, davidedmundson

Reviewed By: #kwin, fvogt, davidedmundson

Subscribers: kwin, fvogt

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18353
2019-01-18 15:45:13 +02:00
David Edmundson
3e68254eff Merge branch 'Plasma/5.15' 2019-01-17 23:43:28 +00:00
David Edmundson
e0071910f2 Fix DesktopGrid drag on X11
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
2019-01-17 23:43:11 +00:00
Jonathan Riddell
962fce229e Update version number for 5.15.80
GIT_SILENT
2019-01-17 12:45:34 +00:00
Jonathan Riddell
c308565424 Update version number for 5.14.90
GIT_SILENT
2019-01-17 10:51:25 +00:00
Jonathan Riddell
05109e4b39 bump KF5 dependency to required 5.54 as agreed at start of Plasma 5.15 cycle 2019-01-17 10:42:27 +00:00
David Edmundson
e6b5903fff [kcmkwin/kwindesktop] Remove pointless layout container
Summary:
ColumnLayout only contains one item so is rather pointless, but more
importantly prevents size hints from the formLayout propogating up to
the ScrollViewKCM.

Test Plan: Opened KCM

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18297
2019-01-16 15:16:40 +00:00
Marco Martin
f95a9618a7 take the name of the VirtualDesktop instance
the name of the PlasmaVirtualDesktopInterface must be taken from
the VirtualDesktop instance, not from itself

BUG:403145
2019-01-16 11:28:35 +01:00
Marco Martin
23dc03f734 support decorations from lookandfeel
Summary:
the Lookand Feel kcm already applies decorations to kwin, allow to
read them as defaults for the case of distribution customization
where a different lnf with a different deco is wanted

Test Plan: tested to start kwin with a different lnf which loads an aurorae decoration

Reviewers: #plasma, #kwin, davidedmundson

Reviewed By: #plasma, #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18261
2019-01-16 10:40:54 +01:00
David Edmundson
7c15bc7765 [kcmkwin/kwindesktop] Fix error in desktop layout indicator initial state
Summary:
kcm.osdTextOnly is the inverse of "show desktop layout indicators"

The save was inversed, the load was not.

Also port from onCheckedChanged to onToggled as that's emitted only on
user changes and not on binding re-evaluation.

BUG: 403150

Test Plan:
Toggled it
Reopened KCM
Checked kwinrc

Reviewers: #kwin, ngraham

Reviewed By: ngraham

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18272
2019-01-15 21:52:28 +00:00
Vlad Zagorodniy
de04d362da [kcmkwin/rules] Return absolute path of decoration color scheme
Summary:
We need to return the absolute path instead of base name so decoColorToCombo
can return the correct index.

Test Plan:
* Go to System Settings > Window Management > Window Rules;
* Create a new rule for Konsole to force the Oxygen color scheme,
  close the dialog, and click the Apply button;
* Open the rules dialog (you don't have to modify anything), click OK button, then Apply button.

Without this patch, Breeze color scheme will be forced after the
last step.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: graesslin, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17655
2019-01-14 22:05:04 +02:00