Summary:
So far KWin did not properly handle popup windows. That is when a popup
surface got created and a click outside the surface happened KWin did not
send out the popupDone Wayland event.
This change makes KWin aware of whether a surface is a popup and tracks
through a new PopupInputFilter whether there are popup windows. In case
there are popups the new filter waits for mouse press events and cancels
the popups if the press does not happen on any surface belonging to the
same client. To quote the relevant section of the Wayland documentation:
The popup grab continues until the window is destroyed or a mouse
button is pressed in any other client's window. A click in any of the
client's surfaces is reported as normal, however, clicks in other
clients' surfaces will be discarded and trigger the callback.
So far the support is still incomplete. Not yet implemented are:
* support xdg_shell popup windows
* verifying whether the popup is allowed to be a popup
* cancel the popup on more global interactions like screen lock or
kwin effect
BUG: 366609
FIXED-IN: 5.10
Test Plan: Auto test and manual testing with QtWayland client
Reviewers: #plasma, #kwin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5177
Summary:
The emergency show window should be considered as a lock screen window
and be shown while the screen is locked. This is the KWin part to D5157.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5158
Use caption(false) otherwise it includes the "(Not Responding)" part.
Unfortunately we also lose the <1> and <2> suffix.
Differential Revision: https://phabricator.kde.org/D5307
When an application is not responding, its window is desaturated to communicate this.
Also "(Not Responding)" is added to the title bar.
Differential Revision: https://phabricator.kde.org/D5245
Summary:
The gui element to select the platform interface is dropped. Thus we
should not store the config for it. This is rather important as changing
compositor settings on Wayland would result in egl being written into the
config which potentially breaks an X11 session.
BUG: 378114
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5285
Summary:
This was forgotten during implementing the interactive window/point
selection. With this change it is also possible to perform the
interaction through touch events. In that case KWin takes over any
existing touch sequence.
This implements T5315.
Test Plan: Added auto test and took a screenshot through touch events
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5203
Summary:
The effect unset the WindowClosedGrabRole unconditionally if it does not
manage the window. This results in any grab set by other effects to break.
BUG: 376609
FIXED-IN: 5.9.5
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5225
As pointed out by the Valgrind trace in #363224, delaying the signal causes
the EffectWindow* argument to become invalid before the connected slot is
called (this is because Qt discards only delayed signal->slot calls where
the receiver gets deleted meanwhile, not the sender and definitely not
a random argument.
If the supposed glitches really happen, they should get fixed correctly,
and for all cases (I doubt only desktop number would be involved but
not e.g. shaded or minimized states).
https://phabricator.kde.org/D5164
Summary:
This change extends the XInputEventFilter to also listen for all touch
events on the root window.
The touch points are passed to the new gesture recognizer in screenedges.
Please note that I'm not using X11 and have hardly tested this change in
real world. To our X11 users with touch screen support: please test!
Test Plan: Can activate and deactivate the screenedge.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5137
Summary:
Each Edge creates a SwipeGesture for touch activation. The swipe needs to
be a single finger starting from the edge into the screen for at least
20 %. The SwipeGesture and GestureRecognizer is extended to support the
use cases of the touch screen edge swipe.
New features supported by the gesture system are:
* minimum and maximum position
* a minimum delta for the swipe
* progress signal based on the minimum delta
* starting a swipe with a start point
The Edge has the progress signal connected to its approach signal, thus
visual feedback is provided through the screen edge effect.
The screen edge system supports touch only for the edges (corners are
too difficult to activate on touch screens). At the moment the following
features are supported:
* screen edge show/raise of windows (e.g. auto hidden panels)
* trigger the configured action
* trigger the configured callback function (e.g. script)
In future it might make sense to add a touch specific configuration
action to support different actions for screen edges activated by mouse
and touch.
BUG: 370323
Test Plan:
configured a screen edge and triggered through touch,
added an auto-hiding panel and triggered through touch
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5106
Summary:
This change adds global touchpad swipe gestures to the
GlobalShortcutsManager and hooks up the swipe gestures as defined at the
Plasma Affenfels sprint:
* swipe up: Desktop Grid
* swipe down: Present Windows
* swipe left: previous virtual desktop
* swipe right: next virtual desktop
The main work is handled by two new classes: SwipeGesture and
GestureRecognizer. This is implemented in a way that it can be extended
to also recognize touch screen gestures and pinch gestures.
The SwipeGesture defines what is required for the gesture to trigger.
Currently this includes the minimum and maximum number of fingers
participating in the gesture and the direction. The gesture gets
registered in the GestureRecognizer.
The events for the gesture are fed into the GestureRecognizer. It
evaluates which gestures could trigger and tracks them for every update
of the gesture. In the process of the gesture tracking the
GestureRecognizer emits signals on the Gesture:
* started: when the Gesture gets considered for a sequence
* cancelled: the Gesture no longer matches the sequence
* triggered: the sequence ended and the Gesture still matches
The remaining changes are related to hook up the existing shortcut
framework with the new touchpad gestures. The GlobalShortcutManager
gained support for it, InputRedirection and EffectsHandler offer methods
to register a QAction. VirtualDesktopManager, PresentWindows and
DesktopGrid are adjusted to support the gesture.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5097
Summary:
Consider the following situation: we have three InputEventFilter linked
in the sequence A - B - C.
The input filters are processing pointer motion events. The expected
behavior is that the new motion is processed in the sequence
A -> B -> C
So far this did not work correctly if the pointer gets warped during the
processing. If e.g. filter B warps the pointer we get a motion sequence:
A (1) -> B (1) -> A (2) -> B (2) -> C (2) -> C (1)
The filters following the one warping the pointer get first the newer
than the older position. This is obviously wrong. Unfortunately it is not
just a theoretical condition, but a condition happening when interacting
with the screenedges, which warp the pointer.
This change introduces a PositionUpdateBlocker in
PointerInputRedirection::processMotion to ensure that a processMotion
call finishes prior to the next update. If the PositionUpdateBlocker is
blocked the new position gets scheduled and processed once the
PositionUpdateBlocker gets destroyed.
With this we get the expected sequence for B warping pointer:
A (1) -> B (1) -> C (1) -> A (2) -> B (2) -> C (2)
This should hopefully improve the interaction with screen edges on
Wayland.
CCBUG: 374867
Test Plan:
Added an auto test demonstrating the issue of incorrect
ordering caused by screenedges. Prior to the change the test is failing.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5182
Summary:
Currently, if user tries to move one of buttons to the left, ending up
dragging one button onto another, crash occurs.
In addition, this patch replaces verbose replacement(remove/insert) with
more elegant QVector<T>::move(int, int)
BUG: 374153
FIXED-IN: 5.8.7
Reviewers: graesslin, #kwin
Reviewed By: graesslin, #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5117
This makes clicking the application menu button trigger the menu.
CHANGELOG: Aurorae window decorations now support global menu button
BUG: 375862
FIXED-IN: 5.9.5
Differential Revision: https://phabricator.kde.org/D5130
Summary:
aurorae themes have hardoded sizes in pixels in their config files,
but the framesvgs scale by themselves based on font dpi leading
to corrupt results
scale all sizes using the same logic(that's also used in c++ based
kdecorations), gives correct looking scaled decorations
BUG:375868
Test Plan: see screenshot
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5114
same as https://phabricator.kde.org/D5083,
gcc 4.8.5 (opensuse leap) fails building modeltest with
CMakeFiles/testHistoryModel.dir/modeltest.cpp.o: In function `ModelTest::data()':
modeltest.cpp:(.text+0x5a57): undefined reference to `bool QTest::qCompare<int, unsigned int>(int const&, unsigned int const&, char const*, char const*, char const*, int)'
Summary:
In the current code we update the shadows during the decoration paint.
Because this is called in the middle of the Scene::paintWindow and we
have already painted the shadows/built quads, the setShadow() was
deferred to avoid the obvious bugs updating the shadow would cause.
This sucks because it means we're always out by one frame, and it means
we always do two updates.
As the shadow is taken from the buffer, we can solve that problem by
updating the shadow before any painting at the same time that we update the
buffer. This means we don't need the deferring hack.
This patch also fixes a related issue that m_padding could have
changed after the buffer is rendered, but before painting. This would lead to rendering a mess.
This patch caches the relevant padding at the time the buffer is
created.
@Notmart, this is subtly different from the patch I showed you last night,
for me it fixes things without your other patch, but I don't know. If it doesn't it's
still (IMHO) a lot cleaner.
Test Plan:
Ran an Aurorae theme
Maximised, restored, resized. Everything.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4990
Summary:
To ease development of touchpad gestures it's useful to have support in
the nested Wayland platform.
Test Plan: Shown in Debug Console of nested KWin
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5059