Commit Graph

1187 Commits (f57f58310978c348429aeac825389ab5db7db45c)

Author SHA1 Message Date
Vlad Zagorodniy b3bd9e7e9b [wayland] Update tabbox when a client is added or closed
Summary: Update tabbox similar to how it's done in KWin/X11.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21005
2019-07-29 21:24:21 +03:00
Vlad Zagorodniy 702a4ff688 [wayland] Implement maximize rules
Summary:
There is still one small issue that has to be addressed in the future:
xdg-toplevel doesn't have states like MAXIMIZED_VERT or MAXIMIZED_HORZ,
thus Window Rules KCM should display only single maximize rule(not two)
for wayland clients.

Test Plan: The new tests pass.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19414
2019-07-29 20:56:30 +03:00
Vlad Zagorodniy bbe898243a [wayland] Implement size and position window rules
Test Plan: The new tests pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19413
2019-07-29 20:56:30 +03:00
Roman Gilg cc801a4518 Use new slot syntax in Compositor class
Summary:
As a preparation for further changes clean up the Compositor
class. First step is to use the new slot syntax and rename
some of the slots.

Includes some other minor code style improvements to the class
as well.

Test Plan: Manually in X and Wayland nested session.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: davidedmundson, zzag, kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D22218
2019-07-04 14:22:04 +02:00
Roman Gilg 994fafa912 Move non-Compositor functions out of composite.cpp source file
Summary:
Compositing today is ubiquitous. There is no reason to keep compositing
specific functions of Toplevel, Client and Workspace classes in the
composite.cpp source file. Instead let these definitions be separated.

Test Plan: Compiles

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D21654
2019-06-22 12:02:54 +02:00
Vlad Zagorodniy c438ecbb70 Don't crash when highlighted tabbox client is closed
Summary:
The compositor tries to switch to the next tabbox client when currently
highlighted client is closed. Though there is a small issue with that.
Because the switch happens too late, a dangling pointer can be inserted
into the unconstrained stacking order, which can lead to a crash later on.

There are two cases:
- compositing is on;
- compositing is off.

Compositing is on: TabBox will try to un-elevate currently highlighted
client, though by that time the client no longer owns EffectWindow, so
this is basically a no-op (that's why we haven't experienced this bug
before).

Compositing is off: TabBox will try to restack currently hightlighted
client under the next tabbox client. Given that the restack method
doesn't do any sanity checks(see Client::manage why), a client that is
about to be destroyed will be re-inserted back into the unconstrained
stacking order.

This change ensures that the switch happens before currently highlighted
client is removed from the stacking order.

BUG: 406784

Test Plan:
- Turn off compositing;
- Follow steps to reproduce in the bug report (see comment 2).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20916
2019-05-03 21:25:13 +03:00
Vlad Zagorodniy 8010e076ee Revert "Move keep-above clients to the Normal layer when showing desktop"
This reverts commit 1e2a0028c3.

Unfortunately, we can't move clients from the above layer to the normal
layer because some of those clients have to be visible when showing
desktop, one such client for example is krunner.

CCBUG: 406101
2019-04-16 11:10:20 +03:00
Erik Kurzinger c898f96df3 [platforms/drm] EGLStream DRM Backend Initial Implementation
Summary:
This is the initial implementation of a DRM backend based on the EGLDevice,
EGLOutput, and EGLStream extensions, supporting NVIDIA graphics hardware using
their proprietary driver. The new backend will be used if the environment
variable KWIN_DRM_USE_EGL_STREAMS is set. On initialization, it will attempt to
create an EGLDevice based on the DRM device currently in use and create
EGLOutputs and EGLStreams for any attached displays. These are used to control
presentation of the final composited frame. Additionally, it will register the
wl_eglstream_controller Wayland interface so that native EGL windows created by
clients can be attached to an EGLStream allowing buffer contents to be shared
with the compositor as a GL texture.

At this time there are two known bugs in the NVIDIA driver's EGL implementation
affecting desktop functionality. The first can result in tooltip windows drawn
by plasmashell to contain incorrect contents. The second prevents KWayland from
being able to query the format of EGLStream-backed buffers which interferes
with the blur effect. Fixes for both of these are currently in development and
should appear in an upcoming NVIDIA driver release.

Additionally, hardware cursors are currently not supported with this backend.
Enabling them causes the desktop to intermittently hang for several seconds.
This is also likely a bug in the NVIDIA DRM-KMS implementation but the root
cause is still under investigation.

Test Plan:
On a system with an NVIDIA graphics card running a recent release of their
proprietary driver

    * Ensure the nvidia_drm kernel module is loaded with the option "modeset=1"
      ("# cat /sys/module/nvidia_drm/parameters/modeset" should print "Y")
    * Ensure EGL external platform support is installed
      https://github.com/NVIDIA/eglexternalplatform
    * Ensure KWin was build with the CMake option
      KWIN_BUILD_EGL_STREAM_BACKEND=ON (this is the default)
    * Start a plasma wayland session with the environment variable
      KWIN_DRM_USE_EGL_STREAMS set
    * Ensure output from KWin OpenGL initialization indicates the NVIDIA EGL
      driver is in use (as opposed to Mesa / llvmpipe).
    * Desktop should be fully functional and perform smoothly.

Reviewers: #kwin, romangg, davidedmundson

Reviewed By: #kwin, romangg, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18570
2019-04-15 07:26:22 -07:00
Vlad Zagorodniy 1e2a0028c3 Move keep-above clients to the Normal layer when showing desktop
Summary:
Implementation of the Show Desktop feature moves desktop windows to
the Above layer, but it doesn't take into account existing clients
that belong to the Above layer. If there are any, we have to move
them to a layer below (e.g. normal), otherwise those clients will be
visible when showing the desktop.

BUG: 406101

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D20153
2019-04-02 23:44:20 +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 0984f6ccfd Merge branch 'Plasma/5.15' 2019-03-08 10:39:26 +02:00
Vlad Zagorodniy a9e469bf13 Properly restore current desktop from session
Summary:
VirtualDesktopManager is initialized in two places: Workspace::init and
Workspace::initWithX11. The former method loads virtual desktops from
the config file and the latter method synchronizes VirtualDesktopManager
with RootInfo.

Both methods do

    if (!VirtualDesktopManager::self()->setCurrent(m_initialDesktop))
        VirtualDesktopManager::self()->setCurrent(1);

which makes sense in Workspace::init, but not in Workspace::initWithX11.

When Workspace::initWithX11 is called, the current virtual desktop is
the same as m_initialDesktop. So that piece of code basically makes
the first virtual desktop current no matter what.

BUG: 390295
FIXED-IN: 5.15.3

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19520
2019-03-08 10:38:46 +02: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 2799f69533 Move groupTransient and group from Client to AbstractClient as virtual
Summary:
The default implementations just return false/nullptr. The advantage of
having this in AbstractClient is that we can reduce the needed casts
from AbstractClient to Client in core as can be seen in this change.

There are more cases which can be improved thanks to this refactoring
which will follow in dedicated commits.

Test Plan: ctest passes

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17890
2019-01-12 07:35:18 +01:00
Vlad Zagorodniy a0fe38c9b3 [wayland] Send only clients that were on the removed desktop to a new desktop
Summary:
Currently, if a virtual desktop was removed, then we'll try to send all
clients to the last virtual desktop even though most of those clients
weren't present on the removed virtual desktop.

Test Plan: Manually.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17576
2018-12-14 14:22:30 +02:00
Martin Flöser 3e62f6aabe Remove no longer needed cast to Client in Workspace::sendClientToDesktop
Summary:
This change removes a small difference between X11 and Wayland clients.
It ensures that all transients are sent to the same desktop as the main
window. A similar check is already in AbstractClient::setDesktop, so in
general it already worked. This is just a special case for
sendClientToDesktop which supports sending to the same desktop so that
all transients are sent to that desktop.

Test Plan: New test case which fails without this change

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17546
2018-12-13 19:36:28 +01:00
Laurent Montel 3feb08ec71 Use https url 2018-12-11 07:15:15 +01:00
Vlad Zagorodniy 8af6d4f5dc [x11] Emit clientRemoved after client was removed
Summary:
Currently, there is a guarantee that a client, which is about to be removed,
is no longer in the stacking order(both in constrained and unconstrained)
when Workspace::removeClient is called. However, because the client gets
removed from m_allClients after clientRemoved is emitted, it can be
re-inserted back into the stacking order.

In general, the pattern is to do some work and then notify others about
what you've done by emitting a signal. In the case of Workspace::removeClient,
we emit clientRemoved way before the client actually gets removed.

CCBUG: 392412
CCBUG: 400854

Test Plan:
* Enable the following script:

```lang=js
workspace.clientAdded.connect(function (client) {
    if (client.skipTaskbar || client.modal || client.transient) {
        return;
    }
    workspace.desktops = workspace.desktops + 1;
    workspace.currentDesktop = workspace.desktops;
    client.desktop = workspace.currentDesktop;
});

workspace.clientRemoved.connect(function (client) {
    if (client.skipTaskbar || client.modal || client.transient) {
        return;
    }
    workspace.desktops = workspace.desktops - 1;
});
```

* Open an app, close the app.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17069
2018-11-26 10:50:54 +02:00
Vlad Zagorodniy 3aa3321048 Fix -Wunused-variable
Summary:
Compiler warning message:
    [524/1591] Building CXX object CMakeFiles/kwin.dir/workspace.cpp.o
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp: In lambda function:
    /home/vlad/Workspace/KDE/src/kde/workspace/kwin/workspace.cpp:233:47: warning: unused variable ‘otherDesktop’ [-Wunused-variable]
                             const VirtualDesktop *otherDesktop = VirtualDesktopManager::self()->desktops().first();
                                                   ^~~~~~~~~~~~

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17060
2018-11-20 20:35:52 +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
Martin Flöser e54b0ef79a Merge branch 'Plasma/5.12' 2018-03-29 17:51:24 +02:00
Martin Flöser 4205496033 Ensure _NET_CURRENT_DESKTOP is set on startup
Summary:
Seems to have regressed in Plasma 5.12 due to code reordering. Now the
property is explicitly updated once the NETRootInfo is created.

BUG: 391034
FIXED-IN: 5.12.5

Test Plan:
Test case exposing the problem added. Fails without the patch,
succeeds with the patch.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10836
2018-03-29 17:50:07 +02:00
Martin Flöser bbf00fdd98 Require libinput and udev
Summary:
The main reason for not having it as a mandatory dependency was that BSD
doesn't support it. But as I learned recently it is available on our CI
system. So BSDs have support now.

Even more it showed that the code doesn't compile if the dependency is
missing. And there's one thing I hate: broken build configuration
options.

So let's make UDEV and libinput a required dependency and get rid of the
problems.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10057
2018-02-04 15:00:42 +01:00
Martin Flöser 9a965405e3 Support updating deco for changes of borderless maximize windows config
Summary: So far only updated the Clients, now also ShellClient.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8095
2017-11-14 17:51:54 +01:00
Fabian Vogt 320602ae14 Merge branch 'Plasma/5.11' 2017-11-11 19:29:01 +01:00
Fabian Vogt 267fa23e58 Merge branch 'Plasma/5.8' into Plasma/5.11 2017-11-11 19:25:40 +01:00
Fabian Vogt 73f5b09e3b Remove unnecessary QString::arg call
Summary: Fixes 'QString::arg: Argument missing: "---------\n" , 0'

Test Plan: Didn't test this at all.

Reviewers: #plasma, graesslin

Subscribers: kwin, plasma-devel, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8764
2017-11-11 19:03:47 +01:00
David Edmundson 92e5db1ffe Debug output for platforms
Summary: Mostly so DRM can report if it has AMS or not

Test Plan:
Ran on my DRM setup, printed debug.
Spawned nested compositor, printed debug on that

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8702
2017-11-07 19:12:51 +00:00
David Edmundson b806915d5d Print screen scale in supportInformation
Test Plan: Printed support info.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8703
2017-11-07 19:12:40 +00:00
Martin Flöser 018afd092a Guard X11 access in supportInformation
Caused crash when running KWin without X11 support.
2017-11-01 15:09:40 +01:00
Martin Flöser c2d4cb8846 Support initial minimize rule in ShellClient
Summary: Honors the rules for minimizing a window on initial show.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8182
2017-10-19 18:00:42 +02:00
Martin Flöser 1e7b4fbc8a Merge branch 'Plasma/5.11' 2017-10-15 16:40:03 +02:00
Martin Flöser 1b01f1b300 Update pointer position whenever a window gets (un)minimized
Summary:
This fixes the following problem:
1. Have two windows maximized
2. Click minimize button on first window
3. Click minimize button on second window

What happened:
Second click was ignored as the pointer was not updated.

BUG: 378704
FIXED-IN: 5.11

Test Plan:
Nested KWin/Wayland, added two maximized windows, minimized
both without moving the mouse

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8145
2017-10-15 16:38:45 +02:00
Martin Flöser 35bcc9fc35 Port RuleBook::discardUsed from Client to AbstractClient
Summary: Prepares the Rules update on reconfigure for Wayland windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8094
2017-10-07 08:07:24 +02:00
Martin Flöser f988a5f654 Reload VirtualDesktop settings after passing RootInfo on VirtualDesktopManager
Summary:
The load method and updateLayout ensure the virtual desktop information
is synced to RootInfo and thus to other X11 applications. Thus we need
to call it again when initing X11.

BUG: 385260

Test Plan: Not tested as I'm on Wayland, but given the changes it's obvious.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8086
2017-10-01 21:56:39 +02:00
Martin Flöser 252980390d Merge branch 'Plasma/5.11' 2017-10-01 15:26:40 +02:00
Martin Flöser 0d96e60b79 Also send Wayland clients to a new desktop if their desktop was removed
Summary:
So far the method only operated on X11 clients. So when the last desktop
got removed Wayland clients were still on it. As the auto test showed:
this results in a crash.

Credits go to code coverage as it showed that area as red, which made me
look on it and realize this must be broken.

Test Plan: New test case added

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8082
2017-10-01 11:04:05 +02:00
Martin Flöser 793eecc826 Fix compile warnings after removing ObscurringWindows 2017-10-01 09:51:09 +02:00
Martin Flöser a74f8766c3 Drop OperationModeX11AndWayland and introduce OperationModeWaylandOnly instead
The operation mode X11 and Wayland is no longer supported and probably
hasn't been supported for the last few years. But now there is the
possibility to run Wayland only, so introduce this as a dedicated new
OperationMode.
2017-09-30 15:09:06 +02:00
Martin Flöser 0c8c047d78 Don't crash on tear-down of Workspace if run without X11 support
Much easier than expected.
2017-09-30 13:31:14 +02:00
Martin Flöser 5cbd28f9a0 Move X11 specific Workspace initialization code into dedicated method
Summary:
This is required to start KWin/Wayland without XWayland support or
delayed XWayland support.

Test Plan: Run kwin_x11 in a nested Xephyr

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7897
2017-09-30 13:03:52 +02:00
Martin Flöser ec7fe44190 Make xstacking order dirty handling work without X11
Summary:
The xStackingOrder unlike indicated by it's name is relevant for both
X11 and Wayland and contains the stacking order of the windows used for
compositing.

So far it was determined whether it needs to be recreated based on
whether an xcb query is pending. This change introduces a boolean
variable to check whether the stacking order is dirty and guards the X11
specific code to only be run if we have an X11 connection.

This is to my current knowledge the last remaining issue where X11 was
used during the normal Wayland operation mode. Now it should be possible
to re-order the Workspace startup [1] and try to run kwin_wayland without
Wayland support.

[1] Workspace::Workspace and Workspace::init is still highly X11
specific and needs to be split into X11 only and general parts.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7856
2017-09-30 12:59:20 +02:00
Martin Flöser 38ce05eaff Drop the ObscurringWindow functionality on desktop switching
Summary:
The ObscurringWindows are a hack to make it more unlikely that the
desktop wallpaper becomes visible while switching desktops. This was
introduced in 2001 with SVN revision 90111
(git d194f74314).

In 2001 desktop switching was probably a costly action where it was not
possible to just reorder the desktop in one frame. Nowadays we use
mostly compositing and with compositing the ObscurringWindows are
already disabled. But even in the case that no compositing is used I
consider it as very unlikely that the desktop becomes visible during the
switching. Given that I think it's time to remove this legacy solution.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7965
2017-09-27 17:17:03 +02:00
Martin Flöser 42fd77b836 Drop unused method Workspace::waitForCompositingSetup
Seems to have been used in old compositing kcm, documented as DBus API.
But Workspace doesn't expose a DBus interface anymore and our new DBus
interface does not call this method -> it is dead.
2017-09-24 10:28:47 +02:00
Martin Flöser 4cef894e87 Drop delegating Workspace::slotToggleCompositing
Instead connect global shortcut directly to method in Compositor.
2017-09-24 10:15:13 +02:00
Martin Flöser e6ca321317 Drop ENABLE_TRANSIENCY_CHECK related code as it doesn't compile
Summary:
The code ifdefed by ENABLE_TRANSIENCY_CHECK does no longer compile and
has not compiled since the switch to Qt 5 and KF5 as it still uses
kDebug and (worse) kDBacktrace. There are several other changes which
broke the code and I failed trying to get it to compile again. It's a
classic example of bitrot happening to code which is never getting
compiled.

As this has not been in a state which could compile for at least several
years, I think it's best to completely remove it.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7958
2017-09-24 08:17:30 +02:00
Martin Flöser 551a6246a8 Move XRenderUtils init/cleanup into X11 standalone platform
Summary:
Only needed for kwin_x11 variant (required for the non-composited
Outline). As that's nowadays in the x11 platform, we can move the
complete XRenderUtils support into the platform. Thus KWin core does
no longer require to link it.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7760
2017-09-22 15:20:55 +02:00
Martin Flöser bd5f5e0915 Move X11 movingClient handling into a dedicated X11EventFilter
Summary:
Splits out the X11 specific window movement handling so that it's not
used in the Wayland case at runtime. As a nice side effect it
un-spaghetties the X11 event handler.

Test Plan:
Run nested KWin on Xephyr and nested KWin/Wayland to verify
that move/resize of X11 windows is still working

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7374
2017-09-01 16:57:43 +02:00
Martin Flöser 778b7d037f Forward showing desktop only to rootInfo if it changed
Summary:
There was a property change for whenever a window gets activated although
that doesn't change the state.

In addition a nullptr check for rootInfo is added for the future no
XWayland case.

Test Plan:
run xev -root to verify the property does not get updated
needlessly

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7097
2017-08-19 19:36:20 +02:00
Martin Flöser 36a3189863 Create a dedicated X11EventFilter for recognizing first user interaction
Summary:
Workspace monitors the X11 events to detect when the user first
interacts with the system. This is only required on X11 for activating
the same client from previous session. So far this was spread over many
parts in the long event switch statement. To make this more contained a
dedicated event filter is introduced which also gets deleted again once
the first user interaction got recognized.

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7371
2017-08-19 10:14:53 +02:00