Commit Graph

254 Commits (26950a65a6fab7d7eb58b61bc2a4a2705de13aab)

Author SHA1 Message Date
Aleix Pol 26950a65a6 Have Toplevel::damage emit a QRegion
Instead of looping through the rects in the region, emit the region at
bulk. It reduces the amount of emissions we do and allows us to pack the
response accordingly.
2020-09-22 14:45:08 +02:00
Vlad Zahorodnii 79c667ea67 libkwineffects: Bump API version
The API version must be bumped because a new virtual method in the
EffectWindow class had been introduced that breaks BC.
2020-09-18 12:02:46 +03:00
Aleix Pol 651b0df30c Make WindowQuadList a QVector
In my last profiling session I did see a lot of WindowQuadList creation
cost. We know QList is a bit more expensive, so let's just use QVector.
2020-09-15 16:01:14 +00:00
Adrien Faveraux 788c65d260 Fix Build Warning 2020-08-26 19:24:02 +02:00
Vlad Zahorodnii 4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
Niccolò Venerandi e41c5af676 Expose transientFor and only blur underneath when transientParent is dock 2020-08-02 10:25:28 +00:00
Aleix Pol 3a9d7a6e9d Port KWin to KWaylandServer
Summary: Away from KWayland::Server and KF5WaylandServer.

Test Plan: Builds, ran nested session

Reviewers: #kwin, #plasma, #frameworks, davidedmundson, zzag

Reviewed By: #kwin, #plasma, davidedmundson, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29278
2020-04-30 12:56:08 +02:00
Méven Car 66898e7f46 Wayland: Allow to take single screen screenshots using scale factor without loss
Summary:
The screenshot made on screens with scale factor were downscaled by their scale factor making them blurry.
It prevents taking screenshots of missing Hidpi related bugs showing the issues under Wayland.

This fix the case of a single screenshot, but not the rest:
Multiscreen screenshot downscales the screen using scale factor.
Spectacle rectangular selection screenshot is broken as soon as some scale factor different than 1 is used on any screen.

Test Plan:
Under Wayland with a scale factor on a screen, take a screenshot using spectacle.
The output image is not downscaled and has the same size as the screen resolution.

No other change to any other screenshot mode, or under X.

Reviewers: davidedmundson, #kwin

Reviewed By: davidedmundson, #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D29010
2020-04-20 16:12:26 +02:00
Vlad Zahorodnii bdd6882767 [kwineffects] Drop KWIN_GL_DEBUG
Summary:
It has been broken for many years and no one has filed bug
reports about it (besides me).

BUG: 419285

Test Plan: Ran kwin with KWIN_GL_DEBUG and it still works.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28332
2020-03-27 12:29:24 +02:00
Niccol Venerandi f9394d83f7 Move from Quad to Cubic
Summary: See https://invent.kde.org/websites/hig-kde-org/-/merge_requests/70

Reviewers: #kwin, ngraham

Reviewed By: ngraham

Subscribers: ngraham, zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27827
2020-03-04 19:40:35 +01:00
Vlad Zahorodnii 00f4f88f65 Expose frameGeometryChanged signal to effects
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26864
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii 55b4912004 Update my email address 2020-01-14 18:17:18 +02:00
Vlad Zahorodnii 28b3b8f0d0 [libkwineffects] Expose frame and buffer geometry to effects
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T10867

Differential Revision: https://phabricator.kde.org/D24459
2019-11-27 14:12:30 +02:00
David Edmundson e4ac215fcb [effects] Add effect to hold the desktop window static after plasmashell quits
Summary:
When a plasma session quits, the order of plasmashell and clients quitting is undetermined.

This looks bad as our desktop background disappears quite early. Rather than changing the real order, we can have kwin reference the last pixmap of any desktop and hold on to it.

Lasting till the compositor quits means it stays on the X frontbuffer till X quits and the experience is seamless.

Test Plan: Logged out (with relevant other ksmserver patches)

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24864
2019-11-01 17:14:55 +00:00
Albert Astals Cid e144748c7a Add some const &
Summary:
Won't make things go much faster since everything that was
being passed by value is refcounted but still const & is a bit faster
than refcounting

For shared pointers instead of adding const & we move them into the
destination variable saving some cpu usage but at the same time making
clear the pointer is being stored by not being const &

Reviewers: zzag

Reviewed By: zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25022
2019-10-30 19:23:01 +01:00
Vlad Zahorodnii f93875535c Update my last name 2019-09-29 17:03:25 +03:00
David Edmundson 40b0296d5c [libkwineffects] Introduce API to easily show a QtQuick scene in an effect
Summary:
EffectQuickView/Scene is a convenient class to render a QtQuick
scenegraph into an effect.

Current methods (such as present windows) involve creating an underlying
platform window which is expensive, causes a headache to filter out
again in the rest of the code, and only works as an overlay.

The new class exposes things more natively to an effect where we don't
mess with real windows, we can perform the painting anywhere in the view
and we don't have issues with hiding/closing.

QtQuick has both software and hardware accelerated modes, and kwin also
has 3 render backends. Every combination is supported.

* When used in OpenGL mode for both, we render into an FBO export the
texture ID then it's up to the effect to render that into a scene.

* When using software QtQuick rendering we blit into an image, upload
that into a KWinGLTexture which serves as an abstraction layer and
render that into the scene.

* When using GL for QtQuick and XRender/QPainter in kwin everything is
rendered into the internal FBO, blit and exported as an image.

* When using software rendering for both an image gets passed directly.

Mouse and keyboard events can be forwarded, only if the effect
intercepts them.

The class is meant to be generic enough that we can remove all the
QtQuick code from Aurorae.

The intention is also to replace EffectFrameImpl using this backend and
we can kill all of the EffectFrame code throughout the scenes.

The close button in present windows will also be ported to this,
simplifiying that code base.

Classes that handle the rendering and handling QML are intentionally
split so that in the future we can have a declarative effects API create
overlays from within the same context. Similar to how one can
instantiate windows from a typical QML scene.

Notes:
I don't like how I pass the kwin GL context from the backends into the
effect, but I need something that works with the library separation. It
also currently has wayland problem if I create a QOpenGLContext before
the QPA is set up with a scene - but I don't have anything better?

I know for the EffectFrame we need an API to push things through the
effects stack to handle blur/invert etc. Will deal with that when we
port the EffectFrame.

Test Plan: Used in an effect

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24215
2019-09-27 16:11:05 +01:00
Kai Uwe Broulik 321e17ab68 [EffectWindow] Expose PID to effects
Differential Revision: https://phabricator.kde.org/D24222
2019-09-26 14:54:33 +02:00
Frederik Gladhorn b64e67ce7c Remove disabled TabGroup feature
Summary:
This has been commented out since 2014, I doubt it will come back.
This is a big amount of code, maintenance will be easier without it.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, graesslin, kwin

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23069
2019-09-14 10:58:48 +02:00
Vlad Zagorodniy 630006e6f7 Delete unused includes
We don't use assert().
2019-09-06 16:07:55 +03:00
Vlad Zagorodniy 7a3722b4f5 Switch to Q_ASSERT
Summary:
Switch to Q_ASSERT in order to make code a bit more consistent. We have
places where both assert and Q_ASSERT are used next to each other. Also,
distributions like Ubuntu don't strip away assert(), let's hope that
things are a bit different with Q_ASSERT.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: romangg, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23605
2019-08-31 20:07:05 +03:00
Frederik Gladhorn 12886cf442 Be consistent about touch point id type: use qint32
Summary:
There is no point in using quint32 and casting back and forth in numerous places.
Fix a bunch of compiler warnings that we implicitly cast between signed and unsigned.
This makes things consistent with what we get from libinput.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: zzag, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23086
2019-08-11 22:15:05 +02:00
Frederik Gladhorn 67b7904d5c Fix typo mkae -> make 2019-08-10 00:23:24 +02:00
Vlad Zagorodniy 684b4b635e Use more traditional doxygen style
Summary:
So far we were following a bit unique and rare doxygen comment style:

    /**
     * Contents of the comment.
     **/

Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.

    /**
     * Contents of the comment.
     */

Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.

This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22812
2019-07-29 22:06:19 +03:00
Vlad Zagorodniy 8af2fa73dc Run clang-tidy with modernize-use-override check
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.

The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.

Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.

A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!

The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.

The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22371
2019-07-22 20:03:22 +03:00
Vlad Zagorodniy c7639fd7ed Port away from deprecated headers
Summary: Headers like stdio.h are deprecated in C++.

Test Plan:
Compiles.

clangd no longer spews these warnings

{F6997789, size=full}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22351
2019-07-09 23:59:07 +03:00
David Edmundson 3604aaf74c Close screen grabbing effect when screensaver starts
Summary:
The screenlock fails on X11 if it can't grab the keyboard.

We can't nicely solve the generic case. We can solve the common case of
a kwin effect being active.

It's not critical, arguably not even desirable to have these effects
persist after the screen is locked through an external trigger. We can
just close the effect early.

Key grabs have to be relased early before the close animation completes
so that the locker doesn't have a race based on animation times.

It's not ideal, but no worse than the current state for not much work.

BUG: 234153

Test Plan:
locked screen on a timer
opened various effects

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: ngraham, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20890
2019-06-23 18:00:47 +02:00
Kai Uwe Broulik df85907de3 Support CriticalNotification type and place it in a CriticalNotificationLayer
Differential Revision: https://phabricator.kde.org/D20629
2019-05-02 10:29:38 +02:00
Kai Uwe Broulik 3323857a64 Merge branch 'Plasma/5.15' 2019-04-23 11:00:14 +02:00
Kai Uwe Broulik 97c3cb73ff [libkwineffects] Use fully qualified type name for signal
Qt Script Engine isn't particularly smart at resolving namespaces.

Differential Revision: https://phabricator.kde.org/D20733
2019-04-23 10:54:49 +02:00
Vlad Zagorodniy 2028855517 [libkwineffects] Bump api version
Summary:
libkwineffects in master is no longer ABI compatible with 0.227 because
order of virtual methods in EffectsHandler and EffectWindow had been
changed.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20652
2019-04-18 14:24:01 +03:00
Vlad Zagorodniy 3d46801e5f [wayland] Make sure that only the fading popups effect animates outline
Summary:
Window open/close animation effects should not animate the outline
because the end result is a bit awkward.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19886
2019-04-09 14:21:22 +03:00
Volker Krause 008143c9db Update URLs to use https
Summary: Largely done automatically using the tools from D19996.

Reviewers: yurchor, zzag

Reviewed By: yurchor, zzag

Subscribers: zzag, yurchor, kwin, kde-doc-english

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D20017
2019-03-25 19:26:23 +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
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
Yuri Chornoivan d08950feea Fix minor Doxygen issues 2019-01-13 09:22:11 +02:00
Yuri Chornoivan d17a3ff88f Fix minor Doxygen issues 2019-01-12 12:31:32 +02:00
Yuri Chornoivan 9dbb74afb7 Fix minor Doxygen issues 2019-01-11 15:36:22 +02:00
Vlad Zagorodniy ef7b553cb4 [libkwineffects] Port the remaining bits of API to dynamic dispatch
Summary:
7834bec52a missed to port minimize and
unminimize to dynamic dispatch. In addition to that, we don't benefit
from QMetaObject::invokeMethod so port addRepaint and addLayerRepaint
to dynamic dispatch as well.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18049
2019-01-07 21:40:45 +02:00
Vlad Zagorodniy 17358796ab [libkwineffects] Bump API version
Summary:
Recently, libkwineffects got some changes that break ABI compatibility,
so we have to bump the API version.

Test Plan:
When using a binary effect, which is made against 226 version, KWin no
longer crashes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17444
2018-12-14 21:09:13 +02:00
David Edmundson 7834bec52a [libkwineffects] Replace property name lookup with calling the virtual methods
Summary:
EffectWindow proxies its properties from the client/deleted's
properties.

QObject::property(char*) is a slow string search. It's a loop
of string comparisons not a hash lookup!

QML's use of properties is different, there's a property cache.

It's fetched multiple times for every window in every paint of some
effects (such as blur). Hotspot shows this as a significant amount of
the render pass (X11) with nothing in kwin animating.

This patch replaces the macro that does
parent()->property("propertyName")
with a macro calling the relevant function directly without metaobjects.

This also improves type safety for future changes.

Test Plan:
Existing unit tests
Ran it for a bit

Reviewers: #kwin, graesslin

Subscribers: graesslin, zzag, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16602
2018-11-30 11:22:20 +00:00
Vlad Zagorodniy e02573263f [libkwineffects] Introduce timeline redirect modes
Summary:
The redirect modes control behavior of the timeline when its direction
is changed at the start or target position. For example, consider the
following piece of code:

    TimeLine timeLine(1000ms, TimeLine::Forward);
    timeLine.setDirection(TimeLine::Backward);

What should happen when the direction of the timeline was changed to go
backward? Should the current value of the timeline go from 1 to 0, or
should the timeline stop its "execution"?

In the relaxed mode, the timeline will go from 1 to 0.
In the strict mode, the timeline will stop its execution.

Different effects may prefer different modes for source and target
positions. For example, most C++ effect would prefer relaxed mode for
source position, and strict mode for target position. On the other side,
scripted effects(AnimationEffect) would prefer strict mode for source
position, and relaxed mode for target position(because of set).

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16447
2018-11-17 13:43:39 +02:00
David Edmundson f521d4bbe1 [wayland] add enter/leave virtual desktop API
Summary:
As setDesktop was changed to "move" this left unSetDesktop non-symetric.

This replaces it with explicit API to enter/leave.

This also moves new API to the new object based API rather than still
using ints.

Where numbers are used it has been tidied up so that desktop IDs are
uint, which should be used when we have a list of desktops.
int is used only when we have either a desktop ID or NET::OnAllDesktops
(-1)

Effects API cleared up to use this and use a set of x11 IDs, which
avoids any potential complications of handling add and removes any
ambiguity with what happens if you leave all desktops and such.

Test Plan:
testVirtualDesktops passes (with pending kwayland patch)
Moving a window in the desktop grid on X11 behaves
Moving a window in the desktop grid on wayland behaves

Reviewers: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16704
2018-11-14 11:08:46 +00:00
Vlad Zagorodniy f466307277 [libkwineffects] Use correct type for the desktops property
Summary:
Type of the x11DesktopIds property was changed from QList<int> to
QVector<int> in KWin core, but not in libkwineffects. That resulted in
having effects like slide not working because Qt can't implicitly
convert QVector<int> to QList<int>.

Test Plan: Slide effect works again.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16743
2018-11-07 21:06:37 +02:00
David Edmundson 7e8facc3fd [wayland] Use the new plasma virtual desktop protocol
Summary:
implement virtual desktop support for Wayland.
use the new virtual desktop protocol from D12820
The VirtualDesktopManager class needed some big change in order
to accomodate it, which is where most changes are.
Other than that, it's mostly connections to wire up
VirtualDesktopsManager and VirtualDesktopsManagement(the wayland protocol impl)

Depends on D12820
Other notable detail, is the client visibility updated to reflect the presence
of the client in the plasmavirtualdesktop.
(and the unSetDesktop concept)

Test Plan: used a bit a plasma session together with D12820, D13748 and D13746

Reviewers: #plasma, #kwin, graesslin, davidedmundson

Reviewed By: #plasma, #kwin, davidedmundson

Subscribers: hein, zzag, davidedmundson, kwin

Tags: #kwin

Maniphest Tasks: T4457

Differential Revision: https://phabricator.kde.org/D13887
2018-11-01 16:35:29 +01:00
Vlad Zagorodniy ab5d66dc0f [effects/diminactive] Fix false-triggering of the out animation
Summary:
In some cases, the out transition is false-triggered because we don't
react to changes in the keep-above and the full screen state.

Test Plan:
* Set the keep-above state on a window;
* Click on the desktop;
* (the window didn't "flicker")

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16270
2018-10-18 19:27:01 +03:00
Vlad Zagorodniy f1968d0cd9 [effects/fadedesktop] Properly check whether given window is on a particular virtual desktop
Summary:
In order to check whether a window is on some particular virtual
desktop, one has to use isOnDesktop.

Also, this change adds implicit support for the new virtual desktop protocol.

Test Plan:
Switched between virtual desktops with a Konsole window being on all
desktops.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16103
2018-10-11 16:22:34 +03:00
Vlad Zagorodniy 769f2659dd [effects] Make Scale and Glide effects Wayland-friendly
Summary:
The Scale effect and the Glide effect have to animate only ordinary
windows(i.e. the ones that are considered to be apps).

On X11, in order to distinguish ordinary windows from combo box popups,
popup menus, and other popups, those effects check whether given window
is managed.

On Wayland, there is no concept of managed/unmanaged windows.

XDG Shell protocol defines 2 surface roles:
* xdg_toplevel;
* and, xdg_popup.

The former can be used to implement typical windows, the ones that can
be minimized, maximized, etc.

The latter can be used to implement tooltips, popup menus, etc. Thus,
that's a good criteria to filter popup windows.

CCBUG: 398100

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: #kwin, graesslin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15117
2018-10-09 11:04:35 +03:00