Summary: Removes unneeded includes and reorders the code in a sensible way.
Reviewers: #kwin
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16792
Summary:
Set the mode in AbstractOutput and call into the plugin
for final change on hardware.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Maniphest Tasks: T10016
Differential Revision: https://phabricator.kde.org/D16786
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
Summary:
Currently setDesktop and unsetDesktop were out of sync, with the latter
missing several important signals and updating of transients.
By using a a shared implementation we avoid that, it also allows for an
atomic move of a window between desktops.
setDesktop is changed back to be a moval of desktop as it currently
broke several unit tests as well as changing the behaviour of the move
to desktop shortcut on wayland.
Test Plan:
testBindings now passes
Moved windows with the context menu on X11
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16703
Summary:
If you resize a decorated client by using the resize user action(press
Alt + F3 > More Actions > Resize), then KWin will crash because it gets
stuck in an infinite loop (AbstractClient::performMoveResize <->
ShellClient::setGeometry).
Here's how KWin gets stuck in that loop:
* when you finish resizing the client, AbstractClient::keyPressEvent
will call AbstractClient::finishMoveResize;
* the first thing that finishMoveResize does is block geometry updates,
then it does some clean up (e.g. reset the value of isMoveResize(), etc),
updates the geometry of the client and when it's done, it will emit
clientFinishUserMoveResized signal;
* when PointerInputRedirection notices that signal, it will call
processDecorationMove on the client, which in its turn will indirectly
call AbstractClient::startMoveResize;
* when it's time to go back to AbstractClient::keyPressEvent, geometry
updates are unblocked and if there are any pending geometry updates,
then ShellClient::setGeometry will be called;
* ShellClient::setGeometry will eventually call ShellClient::doSetGeometry;
* ShellClient::doSetGeometry will call AbstractClient::performMoveResize
because AbstractClient::processDecorationMove indirectly called
AbstractClient::startMoveResize;
* AbstractClient::performMoveResize calls ShellClient::setGeometry;
* (at this point, KWin got stuck in the infinite loop)
This change swaps setMoveResizePointerButtonDown and finishMoveResize,
so processDecorationMove won't indirectly call startMoveResize.
BUG: 397577
FIXED-IN: 5.14.4
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16846
Summary:
If the cross fade animation is cancelled, we are not gracefully
unreference the previous window pixmap.
This change addresses that issue by using RAII approach to
reference/unreference the previous window pixmap.
Test Plan: Manually. The Maximize and the Morphing Popups effect still work.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16391
Summary:
With the plasma shell protocol, a ShellClient gets its role/window type
after it's created, so the cached value of the popupWindow property in
EffectWindow can be wrong.
In addition to that, the value of the popupWindow property still can be
wrong because plasma shell surfaces don't have xdg-popup role, so we need
to check NetWM-based window type in ShellClient::isPopupWindow.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16835
Summary:
Kwin tried to not use kcrash by not linking against it.
KIO now links against KCrash as we link against KIO we indirectly link
against KCrash and thus now link and launch kcrash on wayland. This
breaks coredump.
Arguably it should be fixed in KIO, but it's non-trivial.
The advantage of this approach is it allows us to enable drkonqi for
nested mode in the future, or make a non-gui drkonqi that just saves
logs.
Test Plan: Compiles
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: zzag, romangg, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16834
Summary:
Current code path was attempting to use both framebuffer blit and
glReadPixels on OpenGL ES, instead change the code to use framebuffer
blit and glGetTexImage on OpenGL and glReadPixels on the OpenGLES as it
doesn't have glGetTexImage available.
Test Plan: tested on Nexus 5X.
Reviewers: #kwin, davidedmundson, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T10011
Differential Revision: https://phabricator.kde.org/D16802
Summary:
Wayland output is on protocol level and not dependent on the hardware
platform. Next steps are to do the same for output device and then let
the virtual output call into these initializing functions as well.
Test Plan: Manually and auto test.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16783
Summary: Ensures that we can load the plugin when running only from build dir.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16762
Summary:
Kactivitymanagerd is a libexec executable now so we cannot just execute
it and cannot know it's path. We need to stop it as otherwise ctest does
not terminate the testActivities. This change uses dbus to quit the
kactivitymanagerd.
Test Plan: ctest did not timeout on testActivities
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16780
Summary:
Look there, another plugin I didn't remember. The other qml files are
not needed for the aurorae autotest as it's for the svg based themes
instead of qml themes like Plastik.
Test Plan: Further destroyed my system, test failed, with this change passed.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16761
Summary:
testMaximizedPassedToDeco was failing because it didn't handle async
maximization.
testBorderlessMaximizedWindow was failing because setNoBorder can modify
geometry, so we end up with a wrong restore geometry.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16755
Summary:
So far we didn't know why plastik wasn't loaded. Now we get the error
messages.
Test Plan: Saw error messages while investigating failing KWin test
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16753
Summary: The tests running Aurorae need to be able to pick up the plastik plugin.
Test Plan: Removed system install of plastik plugin, now test passes
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16752
Summary:
Trying to get some more information on why the related test fails on
build.kde.org.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16748
Summary:
This ensures that DontCrashAuroraeDestroyDecoTest can load the plastik
window decoration when run from build directory as it happens on
build.kde.org.
Test Plan: Test passes now when manipulating XDG_DATA_DIRS to hide system install
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16745
Summary:
KWin now correctly updates the client maximised state when we have a new
buffer in the new state. The quick tile unit test was unfortunately not
updated.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16739
Summary:
On one of my systems XKB_DEFAULT_LAYOUT is set to "de". This makes a few
tests fail, e.g. pointer input and modifier only shortcuts.
The reason is that those tests assume the xkb default layout behavior,
that is how xkb functions without any layout being set. So having the
env variable around influences the layout generation.
To prevent this the environment variables are unset and thus a
reproducable environment is created.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16737
Summary:
We need to wait till the helper process created the datadevice. For this
we used a while loop. On build.kde.org the test gets stuck in this loop
and times out after 10 minutes.
This change introduces a dedicated signal and we just wait for it. So if
something fails we wait only 5 sec instead of endless. This should help
investigate why the test doesn't work on build.kde.org.
Test Plan: Test works locally
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16741
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
Summary:
If you switch virtual desktops while krunner is sliding in, then
depending on whether your distro strips assert statements away,
KWin can crash.
The reason why it crashes is the sliding popups effect tries to unref
deleted windows that it hasn't referenced before (if there is an active
full screen effect, then popups won't be slided out, which in its turn
means that we won't reference deleted windows). So, in the end, the
refcount of those windows can be -1. That triggers an assert statement
in the destructor of the Deleted class, which checks whether the
refcount is equal to 0.
Popups are not slided while there is an active full screen effect because
we don't know what the full screen effect does.
This patch adjusts the sliding popups effect so it stops all active
animations when user switches virtual desktops or when a full screen
effect kicks in. We need to do that so the effect won't try to
unreference windows in postPaintWindow.
Visually, it doesn't look quite nice, but for now that's good enough.
A proper fix would be more complex: we would need to make sure that
full screen effects ignore sliding popups (and also maybe docks) and
perform some input redirection.
BUG: 400170
FIXED-IN: 5.14.4
Test Plan: I'm not able anymore to reproduce bug 400170.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: davidedmundson, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16731
Summary:
It should be indicating the current state of horizontal and vertical
maximisation not whether it changed or not.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16740
Summary:
Doesn't have any meaningful impact. It's the same performance when T is a pointer,
but it'll bring it consistent with VirtualDesktopManager::desktops
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16736
Summary:
KWin used to do a quirky trick to send key events to the topmost QQuickItem
rather than things going to the activeFocus item.
Sending it to the window previously would have failed as the window
didn't think it was active.
Since 66986d4afd we can just let the
window process the events in a normal QtQuick manner.
BUG: 370185
Fixed-in: 5.15.0
It will require tabboxes to set focus correctly.
The ones I tested did.
Most analysis for this patch was done by Chris Holland.
Test Plan:
Held+alt tab with the "Text" tabbox switcher
pressed up and down
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin, Zren
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16693
Summary:
The xclipboard sync test times out on build.kde.org as KWin is not
installed prior to running the tests. This is due to KWin not finding
the executable for the clipboard sync helper.
This change looks whether the binary exists in the same directory as
KWin's executable. If it exists it is started instead of the hardcoded
path in libexec.
Test Plan: Run the test and verified the correct binary is loaded
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16732
Summary:
On build.kde.org all tests loading scripted effects are failing. This
seems to be because the effects are not installed.
To make this work, this change introduces the following changes:
* scripted effects are copied to ${build}/bin, like all binaries
* the test sets XDG_DATA_DIRS env variable to point to ${build}/bin
This change also needs to be added to further tests once this is
accepted. Furthermore it could be considered whether KPackageLoader
should consider the QCoreApplication::applicationDirPath in addition to
the GenericDataLocation. This would make KPackageLoader work much better
in a build tree only setup.
Test Plan: Test passes locally, obviously not tried on build.kde.org
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16682
Summary:
So far KWin did not re-evaluate the window rules when the Client's
window class changes. Window class is the main (static) feature the rule
selection is based on. For dynamic changing mapping features like caption
KWin does re-evaluate the rules.
The reason for KWin to not evaluate when the class changes is that KWin
expects the class not to change. From ICCCM section 4.1.2.5:
> This property must be present when the window leaves the Withdrawn
> state and may be changed only while the window is in the Withdrawn
> state. Window managers may examine the property only when they start
> up and when the window leaves the Withdrawn state, but there should be
> no need for a client to change its state dynamically.
Unfortunately there are prominent applications such as Spotify which
violate this rule and do change the window class dynamically. While this
is a clear ICCCM violation there is nothing which really forbids it (may
not != must not) and nothing which forbids KWin to react on changes.
As also libtaskmanager started to react on it, it makes sense to also
hook up the required bits for window rules. After all KWin detects
changes to the window class for some time already and has the
functionality to evaluate the rules. So all there is, is one connect
which improves the situation for our users, while at the same time it
should be rather risk free. If a setup window rule breaks after this
change it's due to the client not being ICCCM compliant.
Test Plan:
I don't use any of the affected applications, so it's only
tested with the new added unit test.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16670