Commit graph

15211 commits

Author SHA1 Message Date
Martin Gräßlin
1193b0da77 Initial support for popup window handling
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
2017-04-07 16:14:50 +02:00
l10n daemon script
1e81a12b99 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-04-07 04:09:53 +02:00
Martin Gräßlin
489e6954c5 Support the emergency show property on ksld's lock screen window
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
2017-04-06 16:49:53 +02:00
Kai Uwe Broulik
2cbada20a1 [KWin Killer] Send short caption to it
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
2017-04-05 15:31:35 +02:00
Kai Uwe Broulik
1eb950a985 Desaturate non-responsive windows
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
2017-04-05 11:16:23 +02:00
Martin Gräßlin
5d044331fc Merge branch 'Plasma/5.9' 2017-04-04 19:38:58 +02:00
Martin Gräßlin
a936516107 [kcmkwin/compositing] Do not write GLPlatformInterface config
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
2017-04-04 19:38:02 +02:00
Martin Gräßlin
67295336e5 Add support for interactive selection through touch events
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
2017-03-31 07:44:38 +02:00
Martin Gräßlin
a405a2ac1a Merge branch 'Plasma/5.9' 2017-03-31 07:44:21 +02:00
Martin Gräßlin
49fc310594 [slidingpopups] Only remove WindowClosedGrabRole if the effect owns the grab
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
2017-03-31 07:42:11 +02:00
Raymond Wooninck
e7b27ab955 Fix build with clang and GCC6
Differential Revision: https://phabricator.kde.org/D5229
2017-03-29 14:45:44 +02:00
Martin Gräßlin
dce674f3ae [autotests] Adjust ShellClientTest to changes in 634dfc09e4
The desktopPresenceChanged signal is no longer delayed by one cycle.
2017-03-29 06:49:12 +02:00
Martin Gräßlin
4adb2b65e8 [autotests] Add test case for showing auto-hiding panel through swipe gesture 2017-03-28 22:01:16 +02:00
l10n daemon script
3d56f58bf9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-28 13:54:29 +02:00
Luboš Luňák
634dfc09e4 fix occassional crash caused by needlessly delayed signals (bko#363224)
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
2017-03-28 12:59:35 +02:00
l10n daemon script
2d0f08b006 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-28 09:41:02 +02:00
Martin Gräßlin
8672b93bdd Add support for screenedge touchscreen events through XInput 2.2
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
2017-03-27 17:44:15 +02:00
Martin Gräßlin
aa6c8f8116 Add support for activating screenedges through touch swipe gestures
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
2017-03-27 17:44:02 +02:00
Martin Gräßlin
22c91df2ec Add support for global touchpad swipe gestures
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
2017-03-27 17:43:44 +02:00
Martin Gräßlin
0bb587dcb9 Ensure PointerInputRedirection::processMotion finishes prior to warping
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
2017-03-27 07:08:10 +02:00
l10n daemon script
36c22ed0cb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-26 05:00:12 +02:00
l10n daemon script
26ca314687 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-25 06:02:34 +01:00
l10n daemon script
b160c5babb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-25 04:37:53 +01:00
Martin Gräßlin
89058173f7 Merge branch 'Plasma/5.9' 2017-03-24 17:08:15 +01:00
Martin Gräßlin
3ab0de5e18 Merge branch 'Plasma/5.8' into Plasma/5.9 2017-03-24 17:06:09 +01:00
Vladyslav Tronko
c947e0a601 Fix crash on dragging titlebar buttons in System Settings
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
2017-03-24 17:04:09 +01:00
l10n daemon script
70ecf7bfef SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-24 05:15:43 +01:00
l10n daemon script
c2a3f88b6b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-23 05:50:40 +01:00
l10n daemon script
9681ae6849 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-23 04:15:34 +01:00
Kai Uwe Broulik
d491ee79e3 Merge branch 'Plasma/5.9' 2017-03-22 16:52:27 +01:00
Kai Uwe Broulik
c2369507bc [Aurorae AppMenuButton] Show if client has app menu
Differential Revision: https://phabricator.kde.org/D5132
2017-03-22 16:51:20 +01:00
Kai Uwe Broulik
3e0ddba683 [Plastik Decoration] Show application menu button if client has one
CCBUG: 375862

CHANGELOG: Plastik window decoration now supports global menu

Differential Revision: https://phabricator.kde.org/D5131
2017-03-22 16:50:34 +01:00
Kai Uwe Broulik
ffbb25497c [Aurorae DecorationButton] Hook up app menu button
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
2017-03-22 16:49:53 +01:00
l10n daemon script
8725f2441e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-22 05:17:38 +01:00
l10n daemon script
3836e04881 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-22 05:00:58 +01:00
l10n daemon script
5f0b92bac5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-22 04:02:11 +01:00
Luca Beltrame
b128c634c4
Merge remote-tracking branch 'origin/Plasma/5.9'
Conflicts:
    CMakeLists.txt
2017-03-21 20:50:03 +01:00
Luca Beltrame
74d0a19a8a
Merge remote-tracking branch 'origin/Plasma/5.8' into Plasma/5.9 2017-03-21 20:48:43 +01:00
Anthony Fieroni
f0b3be5844 [kcm_kwindecoration] Respect theme colors in buttons
https://phabricator.kde.org/D5116

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2017-03-21 20:56:25 +02:00
Anthony Fieroni
afcdff25db [kcm_kwindecoration] Respect theme colors in buttons
Differential Revision: https://phabricator.kde.org/D5116

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2017-03-21 20:45:45 +02:00
Jonathan Riddell
7573fe8c12 Update version number for 5.9.4
GIT_SILENT
2017-03-21 13:25:38 +00:00
l10n daemon script
b6cffe8dec SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-21 14:02:53 +01:00
l10n daemon script
603b45c5f1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-21 09:44:08 +01:00
Marco Martin
bfbcd01971 support for high dpi in aurorae
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
2017-03-20 17:06:34 +01:00
Marco Martin
404f2675f8 fix compilation on old gcc
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)'
2017-03-20 17:03:11 +01:00
Jonathan Riddell
f4cbd046eb Merge Plasma/5.9 2017-03-20 15:09:19 +00:00
Jonathan Riddell
d0510736a9 merge Plasma/5.8 2017-03-20 14:49:51 +00:00
David Edmundson
ec4359926b Update Aurorae Shadow when we copy the buffer, not one frame after painting
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
2017-03-20 08:51:56 +00:00
l10n daemon script
4d0303fafe SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-03-19 03:56:45 +01:00
Martin Gräßlin
fa4c60e33f Add support for pointer gestures to nested Wayland platform
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
2017-03-18 14:39:30 +01:00