Summary:
Comparing a pure blue square isn't a very effective test as someone
cropping the image will still pass.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6982
Although we made KWin compile with newer include requirement for major
and minor in gnu libc, we still get the warning that it's deprecated.
So let's try to turn the include order around. That should fix the
warning and hopefully still compile on non gnu libc (e.g. FreeBsd). If
it fails, we need to add a cmakedefine for the header.
Summary:
Preparation for X free KWin. Code is called for both X11 and Wayland
windows. So make it not crash if we would not have an X server.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6908
Summary:
Client had a slot to delay a call when setting up a global shortcut for
the Client. This can be simplified by using a std::bind expression.
Similar the action was connected to a one line lambda which can be
expressed through a std::bind expression as well.
Test Plan: New added auto test still passes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6801
Summary:
This way we don't need the sender() hack to get the value set on the
QAction.
Test Plan: New autotest in master still passes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6811
Summary:
They were only delegating into switchWindow(Direction), so let's do the
same through std::bind in kwinbindings and delegate to it directly in
scripting's WorkspaceWrapper.
Test Plan: Not yet, want to add test case for Workspace::switchWindow
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6791
Summary:
Thanks to std::bind we don't need that many different slots to setup the
global shortcut connections. Instead we can have one shared
implementation which takes the argument and passes it to the window.
To support std::bind arguments in kwinbindings the initShortcut method
and dependencies are adjusted as well as a new macro is added.
As I don't want to include abstract_client.h in workspace.h a new enum
is created for the quick tiling flags used in Workspace. This caused a
larger refactoring as the change to an enum class also caused quite some
changes.
Test Plan: Affected test cases still pass
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6783
Summary:
Some libraries loaded into KWin (e.g. breeze) also have a Wayland
connection. If KWin destroyes it's own Wayland connection before the
libraries destroy theirs, KWin might crash on tear down when the
libraries call into libwayland with an invalid connection.
This change requires D6569 in KWayland.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6571
This is a totally stupid warning for an older code base such as KWin. It
generates hundreds of warnings as on legacy code no method uses override.
The output is totally spammed, so it's better to disable it.
This will hopefully also prevent that someone tries to fix it again by
changing all of KWin - which we don't want.
The test was racing on build.kde.org and failing due to that. We have
a condition there where we wait for some parts being transmitted through
X and some through Wayland. The test assumed X is faster and failed due
to that.
Summary:
Moves most of the implementation from Client to AbstractClient, so that
it can be used for both Client and ShellClient. Only the X11 specific
code is kept in Client.
Not yet implemented is updating the window caption.
Unfortunately the testing of this feature showed that setting a window
shortcut is not working on Wayland at all (the Qt widget doesn't properly
catch the shortcut). So this feature is currently only of erm theoretical
use.
Test Plan: Added new test case. No testing in real world as explained.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6818
Summary:
Platform::setupActionForGlobalAccel is an important call on X11 platform.
Without the x11 timestamp doesn't get updated and calls in KWin might
fail - e.g. the activation of the Client which is supposed to happen.
Test Plan: compiles
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6802
Summary:
Only build
* `virtual_terminal.cpp` in the presence of `linux/vt.h`
* `fbdev`-backend in the precense of `linux/fb.h`
Test Plan:
Reviewers: #kwin, #freebsd, graesslin, bcooksley
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6847
Summary:
This time without a test case that could trigger a crash as the only
reading usage of the variable could luckily not crash.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6853
Summary:
The last_active_client is set when an AbstractClient gets activated. For
the X11 case the last_active_client was getting reset to nullptr when
the last_active_client gets destroyed. But for the ShellClient that did
not yet happen. This could result in a crash.
This change addresses the problem and adds a test case which triggered
the crash. The condition of the crash are difficult to generate though -
it took me about an hour to write the test for the crash.
1. Wayland client must be active
2. Explicit focus to null (no active client)
3. destroy Wayland window
4. X11 client which sets focus on itself without interaction with window
manager
Test Plan: test case no longer crashes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6852
KWin cannot handle the layering correctly when a Wayland window is active
and there is a fullscreen X11 window. This test tries to simulate the
situation, but it does not show it.
Nevertheless it's a good test, so let's add it.
CCBUG: 375759
A new test class for KWinBindings added which is intended to group the
testing of the various slots set up in kwinbindings.cpp. As the scripts
also delegate to the slots this is also tested.