Commit Graph

15360 Commits (9265d9fae72f56a84872a7f7728d73746a6ee9a1)

Author SHA1 Message Date
David Edmundson add93b3e36 drm cursor scaling
Summary:
Cursors are drawn low level, so need to go from global compositor space
to device space
(multiplied by the out scale)

Test Plan: Elements interacted underneath where the mouse was

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3499
2017-03-29 20:53:22 +01:00
David Edmundson 0dac5d6bfe Add scaling to DRM backend
Test Plan:
For the first time, actually plugged in my high DPI laptop.
Tested both 1x and 2x windows on 2 real displays one high DPI, one normal

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3498
2017-03-29 20:53:22 +01:00
David Edmundson 584dc1d2d4 Add scaling to virtual backend
Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3497
2017-03-29 20:53:22 +01:00
David Edmundson dec76a77e2 Scale input on windowed backend so input co-ordinate system matches host
Summary:
In theory we shouldn't need to scale input, however when in windowed
mode
we need to convert the host into output normal.

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3496
2017-03-29 20:53:22 +01:00
David Edmundson 59515b1681 Scale QPainter x11 windowed backend
Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3495
2017-03-29 20:53:22 +01:00
David Edmundson 5c0c0cdb91 Set m_client size in global compositor co-ordinates
KWin wants to deal with the post-scaled down client size, not the texture size.

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3494
2017-03-29 20:53:22 +01:00
David Edmundson fd58c68ba5 Set wayland output scale
Summary:
Provides a virtual method in Screens where backends can supply the scale
of each screen, this is then set on each output.

For the X windowed backend this value is taken from a command line
parameter.

Test Plan:
Ran windowed mode with --scale 1 and 2
then kate --platform=wayland from another screen.
On the latter case UI elements were scaled up correctly

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3159
2017-03-29 20:53:22 +01: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
l10n daemon script 7d72aeda5c 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-29 05:17:37 +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 a04d4de06a 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:21:29 +01: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
Roman Gilg a347d009d1 [DrmBackend] Straighten out EGL surface buffer release logic on page flip
The logic on page flips was inconsistent in the sense, that it should never
release a GBM buffer before it's not used (i.e. viewable on the display)
anymore. This happened unintended until now (on page flip we never really
did something useful in the else statement, because if we're here it's not
a GBM buffer anyway).

With this patch we:
* delete on page flips always only the old buffer, which is not used anymore
* release the buffer earlier on interrupts like display disconnect in order
  to be able to destroy the EGL context

Test Plan:
Tested in non atomic mode (atomic mode is obsolete right now until my other
WIP patch D4539 is ready to be merged): Login, logout, suspend, normal use.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5060
2017-03-17 20:41:46 +01:00