Commit graph

14794 commits

Author SHA1 Message Date
Antonio Larrosa
19147f5f85 [platformx/x11] Add a freeze protection against OpenGL
Summary:
With nouveau driver it can happen that KWin gets frozen when first trying
to render with OpenGL. This results in a freeze of the complete desktop
as the compositor is non functional.

Our OpenGL breakage detection is only able to detect crashes, but not
freezes. This change improves it by also added a freeze protection.

In the PreInit stage a thread is started with a QTimer of 15 sec. If the
timer fires, qFatal is triggered to terminate KWin. This can only happen
if the creation of the OpenGL compositor takes longer than said 15 sec.

In the PostInit stage the timer gets deleted and the thread stopeed
again.

Thus if a freeze is detected the OpenGL unsafe protection is written into
the config. KWin aborts and gets restarted by DrKonqui. The new KWin
instance will no longer try to activate the freezing OpenGL as the
protection is set.

If KWin doesn't freeze the protection is removed from the config as
we are used to.

Check for freezes for the first n frames, not just the first

This patch changes the freeze detection code to detect freezes in the
first 30 frames (by default, users can change that with the
KWIN_MAX_FRAMES_TESTED environment variable). This detects
successfully the freezes associated to nouveau drivers
in https://bugzilla.suse.com/show_bug.cgi?id=1005323

Reviewers: davidedmundson, #plasma, #kwin, graesslin

Reviewed By: #plasma, #kwin, graesslin

Subscribers: luebking, graesslin, kwin, plasma-devel, davidedmundson

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3132
2016-10-25 09:51:23 +02:00
l10n daemon script
2e9dc7f28a 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"
2016-10-24 12:07:39 +00:00
l10n daemon script
94d009ec02 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"
2016-10-21 12:01:48 +00:00
Jonathan Riddell
b9efeb6c28 Update version number for 5.8.2
GIT_SILENT
2016-10-18 11:56:18 +01:00
Martin Gräßlin
f642eb9d9d Properly specify libdrm dependency
KWin needs at least 2.4.62 which added the atomic requests.
2016-10-17 16:12:48 +02:00
Martin Gräßlin
e9d20b80e9 [tabbox] Intercept QWheelEvents on QQuickWindow for scrolling
Summary:
The TabBox performs the scrolling of the items by itself in order to
support wheel events even if the mouse is not on the TabBox. For that
KWin grabs pointer events on X11 (on Wayland an input filter is used)
and forwards them to the TabBox.

Qt uses Xinput2 for scrolling on the QQuickWindow. Due to that KWin
does not get any xcb core button press/release events when scrolling
inside the QQuickWindow and thus scrolling doesn't work.

There are three possible approaches to fix this:
1. Implement scrolling support in each of the QML switchers
2. Add an xinput2 filter to TabBox
3. Intercept the QWheelEvents on the QQuickWindow

The first approach has the disadvantage that all themes need
adjustment and that there might be behaviorial difference whether one
scrolls on the TabBox window or outside the window.

The second approach would be most in line with the other filters, but
is difficult due to the nature of xinput2 (no xcb bindings, etc).

Thus the third approach might be the best solution. Wheel events are
only delivered to the QQuickWindow if the native events were not already
intercepted, thus we know it won't have side effects for the case that
Wayland is used or xinput2 is not supported.

The implementation installs an event filter on the QQuickWindow which
gets created when showing the TabBox and inside the filter waits till
there is an angleDelta of +/-120 and scrolls by one per every 120 angle
delta as described in the QWheelEvent documentation.

BUG: 369661
FIXED-IN: 5.8.2

Test Plan: Scrolled with touchpad and mouse wheel.

Reviewers: #kwin, #plasma, broulik

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2953
2016-10-17 08:23:39 +02:00
Martin Gräßlin
78a2732a9a Fix shortcut triggering with shift+letter
Summary:
A shortcut with e.g. shift+w could not be triggered as shift is
considered as consumed. It transforms the keysym to an uppercase variant
thus it is consumed.

This change checks for the condition that shift is pressed and is the
only consumed modifier. If the current keysym is a letter the shift is
removed from the consumed modifier again to still support the shortcut.

BUG: 370341
FIXED-IN: 5.8.2

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3015
2016-10-17 08:13:20 +02:00
Martin Gräßlin
db95b96854 [kwinrules] Hide all autogroup related widgets
Summary:
Window tabs which are required for autogroup are currently not supported
in KWin. Thus exposing autogroup related window rules does not make any
sense.

This change hides the options again in the hope that we can bring the
feature back in future.

BUG: 370301
FIXED-IN: 5.8.2

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2996
2016-10-17 08:02:10 +02:00
Martin Gräßlin
4c7752c965 Support LEDs in Xkb and libinput
Summary:
The Xkb implementation starts to track the state of the LEDs in the
keymap and emits a signal whenever the LEDs change. This signal is
connected to a method in LibInput::Connection which updates the led
state on all devices and uses it to init the state of the led when a new
device gets connected.

BUG: 369214
FIXED-IN: 5.8.2

Test Plan: Connected a keyboard with LEDs and enabled NumLock and ScrollLock.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2943
2016-10-17 08:01:49 +02:00
Jonathan Riddell
1c3cc6239e Update version number for 5.8.1
GIT_SILENT
2016-10-11 10:43:31 +01:00
Martin Gräßlin
e8d6008726 Test case for global shortcut Meta+Shift+w
The global shortcut meta+shift+w does not trigger as the test case
shows.

CCBUG: 370341
2016-10-11 09:26:37 +02:00
Martin Gräßlin
66d1a0cc7a Add event filter for key press/release events while KWin grabbed keyboard on root window
Summary:
The modifier-only-shortcuts break as soon as KWin grabs the keyboard
(e.g. alt+tab, present windows, etc.). The investigation shows that in
that case KWin does not get any raw key events any more and thus gets
confused about the state of the hold modifiers. E.g. alt+tab has the
alt key pressed, but we miss the release as the keyboard is grabbed.

This change addresses the problem by installing an additional event
filter for key press and release event which only filters for key events
on the root window. That way we can be sure that it only operates when
KWin grabbed the keyboard on the root window.

Note: the problem only exists when grabbing on the root window. If the
grab is on another window (e.g. moving a window) we still do get all
events.

The problem also seems to not happen if another application grabbed
keys on the root window. E.g. for key combinations grabbed by
kglobalaccel the correct sequence of key press/release as raw events
are reported. Also while the screen is locked the evemts are reported
and kscreenlocker grabs the keyboard on the root window.

Test Plan:
Used Alt+Tab and Present Windows and tried to activate launcher
afterwards.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2980
2016-10-10 16:59:06 +02:00
Martin Gräßlin
db2ff13d4f Only trigger mod-only-shortcuts if global shortcuts are enabled
Summary:
KWin supports blocking global shortcuts when a window is active through
window specific rules. This change ensures that the modifier only
shortcuts also honor the blocking of global shortcuts. If global
shortcuts are disabled, they won't trigger any more.

BUG: 370146
FIXED-IN: 5.8.1

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2952
2016-10-06 13:28:31 +02:00
Martin Gräßlin
421824b654 Workaround xkbcommon behavior concerning consumed modifiers
Summary:
If a key could be turned into a keysym with a modifier xkbcommon
considers the modifier as consumed even if not pressed.
E.g. Alt+F3 considers alt as consumed as there is a keysym gnerated with
Ctrl+Alt+F3 (vt switching).

This change tries to workaround the problem by ignoring the consumed
modifiers if there are more modifiers consumed than active. It's
possible that this will create regressions for other shortcuts - we need
to test it in the wild. Although this might cause regressions I'm aiming
for Plasma/5.8 branch with the change. It only affects Wayland and fixes
quite important shortcuts from window manager perspective (desktop
switching (ctrl+f1 to ctrl+f4), desktop grid (ctrl+f8), present windows
(ctrl+f9, ctrl+10), cube (ctrl+f11), user actions (alt+f3), close window
(alt+f4)). If it causes regressions they need to be fixed as well in the
Plasma/5.8 branch.

A new API entry point for xkbcommon was proposed, but is not yet merged
and there is no release with it yet. Once that is available the
workaround should get removed and replaced by the new API call.

BUG: 368989
FIXED-IN: 5.8.1

Test Plan: Going to restart session now with the change

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2945
2016-10-06 13:28:02 +02:00
Martin Gräßlin
3bc6089394 Only repeat one key
Summary:
So far KWin tried to repeat all pressed keys which should repeat. But
this is not how X11 and e.g. QtWayland handle it. There only one key -
the last one which got pressed - repeats. And this makes sense as the
key is used to generate a keysym and that one KWin caches. Thus the
logic so far resulted in incorrect keysyms to be generated during the
repeat. E.g. pressing a, pressing b, releasing b would repeat b instead
of the hold a as b was the last generated keysym.

This change addresses this problem and let's only one key repeat at a
time. When the currently repeating key gets released the repeat timer is
stopped and other hold keys won't repeat any more. This also matches the
behavior of X11 and QtWayland.

BUG: 369091
FIXED-IN: 5.8.1

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2941
2016-10-06 13:26:45 +02:00
Martin Gräßlin
26ad65b1e9 Test case for mod only shortcut with global shortcuts disabled
KWin supports disabling global shortcuts while a specific window is
active through window rules. This blocks global shortcuts but does not
block the modifier-only-shortcuts as the new test case shows.

CCBUG: 370146
2016-10-06 07:36:12 +02:00
Martin Gräßlin
974abbfaef [autotests/integration] Add test case for global shortcuts with Fx
New test which tries to trigger Alt+F3 which does not work due to the
behavior how xkbcommon calculates consumed modifers. The combination
Ctrl+Alt+F3 generates a keysym (vt switching) so just pressing F3
already consumes ctrl and alt modifier.

For more information see:
 * https://github.com/xkbcommon/libxkbcommon/issues/17
 * https://bugs.freedesktop.org/show_bug.cgi?id=92818

CCBUG: 368989
2016-10-05 14:43:38 +02:00
Martin Gräßlin
03b8477f27 [autotest/integration] Enable test mode for QStandardPaths
By enabling test mode for QStandardPath kglobalaccel doesn't modify the
user's global shortcuts any more.
2016-10-05 13:21:33 +02:00
Martin Gräßlin
fb59b05488 Add support for resize only borders on Wayland
Summary:
This change adds support for resizing outside the window decoration
(e.g. setting borders to NoSide or None).

To support this a new Toplevel::inputGeometry() -> QRect method is
added which exposes the geometry adjusted by the margins provided by
the decoration. This is checked in InputRedirection when finding a
Toplevel at a given position. The logic for figuring out whether the
event should go to the decoration or the window already handled the
situation correctly, so no further changes are needed.

BUG: 364607
FIXED-IN: 5.8.1

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2787
2016-10-05 07:49:23 +02:00
Martin Gräßlin
fd6e4bb023 Destroy DebugConsole on hide of QWindow
Summary:
The quit button in the DebugConsole is connected to deleteLater on the
DebugConsole. This is to clean up resources like the input event filter
which is rather expensive to have running.

When closed through the window decoration the DebugConsole window only
got hidden but not destroyed. Resulting in the input filter to continue
processing.

This change ensures that the DebugConsole gets properly destroyed once
the window gets hidden.

BUG: 369858
FIXED-IN: 5.8.1

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2931
2016-10-05 07:48:15 +02:00
Rohan Garg
13991f85ea
Fix the build
6199631604 broke the build due to a
missing bracket.
2016-10-04 17:21:51 +02:00
Rohan Garg
6199631604
Check for EGL_KHR_platform_x11 in addition to EGL_EXT_platform_x11
Summary:
Some platforms (like Mali) only report the newer EGL_KHR_platform_x11
on X11.

Reviewers: kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2933
2016-10-04 16:49:31 +02:00
Martin Gräßlin
48db671684 [autotests/integration] Add test case for repeating shortcuts
This adds a new test case for global shortcuts which simulates
triggering a shortcut through key repeat. The test verifies a problem
that the the shortcut continues to be triggered after releasing the key
if another key is still pressed (and triggers repeats).

CCBUG: 369091
2016-10-04 16:02:11 +02:00
Martin Gräßlin
4d47f6d831 [autotests/integration] Add a test case for closing DebugConsole
This test simulates closing the DebugConsole through the window
decoration. Which unlike the dedicated button does not destroy the
DebugConsole.

CCBUG: 369858
2016-10-04 13:37:25 +02:00
l10n daemon script
b2bed00c82 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"
2016-10-02 12:02:41 +00:00
Jonathan Riddell
78143b0cf9 Update version number for 5.8.0
GIT_SILENT
2016-09-29 11:00:41 +01:00
l10n daemon script
226edf8b03 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"
2016-09-28 11:55:23 +00:00
Ivan Čukić
5f4a91e8d7 [kwinrules] Properly setting the value of the activity combo box
Summary:
The activities combobox content is loaded asynchronously,
we are storing the configured value for the window rule
until the activity list is loaded into the combo box.
And then, we set that item as the current one in the combo.

Reviewers: #kwin, mart

Reviewed By: mart

Subscribers: luebking, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2851
2016-09-24 19:17:20 +02:00
l10n daemon script
1f76c005e9 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"
2016-09-24 12:33:32 +00:00
l10n daemon script
75e318f907 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"
2016-09-20 12:51:52 +00:00
Martin Gräßlin
7d93b58578 Fix whether a panel is supposed to have a strut in ShellClient
Summary:
The PanelBehavior was incorrectly mapped to hasStrut resulting in too
many modes creating a strut for the panel.

CCBUG: 368499

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2788
2016-09-16 14:30:10 +02:00
Tobias C. Berner
7b0676ebaf Include <errno.h> in waylandclipboard.cpp
Summary:
`errno.h` needs to be includes, as `errno`, `EAGAIN` and `EWOULDBLOCK` are used.

Without:
> --- helpers/xclipboardsync/CMakeFiles/org_kde_kwin_xclipboard_syncer.dir/all ---
> /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:25: error: use of undeclared identifier 'errno'
>         if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
>                         ^
> /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:34: error: use of undeclared identifier 'EAGAIN'
>         if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
>                                  ^
> /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:44: error: use of undeclared identifier 'errno'
>        if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
>                                           ^
> /wrkdirs/usr/ports/x11-wm/plasma5-kwin/work/kwin-5.7.95/helpers/xclipboardsync/waylandclipboard.cpp:110:53: error: use of undeclared identifier 'EWOULDBLOCK'
>        if (n == -1 && (errno == EAGAIN || errno == EWOULDBLOCK) && ++retryCount < 1000) {
>                                                    ^
> 4 errors generated.
> *** [helpers/xclipboardsync/CMakeFiles/org_kde_kwin_xclipboard_syncer.dir/waylandclipboard.cpp.o] Error code 1

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2794
2016-09-16 10:05:01 +02:00
Sebastian Kügler
99f491e799 parent qaction in test
Summary:
My compiler doesn't seem to like this constructor, it bails out with the
following error:

/home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:
In member function ‘void GlobalShortcutsTest::testConsumedShift()’:
/home/sebas/kf5/src/kde/workspace/kwin/autotests/integration/globalshortcuts_test.cpp:79:40:
error: no matching function for call to ‘QAction::QAction()’
     QScopedPointer<QAction> action(new QAction);
                                        ^~~~~~~

Using this as first argument fixes the build on my machine.

Test Plan: screenedges test fails, others pass. (this screenedges test failure seems unrelated)

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: luebking, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2782
2016-09-15 21:04:29 +02:00
l10n daemon script
38a5933249 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"
2016-09-15 09:48:16 +00:00
Jonathan Riddell
1cb2bd99a0 Update version number for 5.7.95
GIT_SILENT
2016-09-15 10:14:54 +01:00
Martin Gräßlin
7dfe408506 Pass Qt::Key to GlobalShortcutsManager::processKey
So far this method translated the keysym to Qt::Key. This is no longer
needed as the only method which invokes processKey has access to the
translated key. Thus saving one translation for every key press.

Reviewed-By: bshah
2016-09-15 09:02:38 +02:00
Martin Gräßlin
8fdcc24b05 Better handling for forwarding key events to Wayland Server
A new protected method is added to InputEventFilter to forward a
QKeyEvent to the Wayland server. Several input filters need to forward
the event to have a proper state of the events. E.g. the TabBox filter,
but also the internal window filter and effects filter. It's important
to update all events even if the events are not forwarded to a surface.

This new method takes care of the general handling like ignoring key
repeats, etc.

Reviewed-By: bshah
2016-09-15 08:47:01 +02:00
Martin Gräßlin
c70df62ce5 Pass all key events during Alt+Tab to the Wayland Seat
When Alt+(Shift)+Tab is grabbed we have the modifier press key being
passed to the Wayland server as key events are not yet grabbed. As KWin
grabbed the release event the Wayland server considered the key still as
pressed when going into the next application.

This change ensures that all events are also passed to the wayland
server. As no surface has focus we can be sure that it won't be passed
to the application, but it ensures that the events are processed
correctly.

Reviewed-By: bshah
2016-09-15 08:31:05 +02:00
Martin Gräßlin
cd053bf864 Require frameworks 5.26 2016-09-14 15:08:44 +02:00
Martin Gräßlin
e1bcda92a2 [autotests/integration] Test case for window larger than screen
If a window gets opened which will be too large with decorations it
should get a configure event with a smaller size. This currently
doesn't happen as the test highlights.

CCBUG: 366632
2016-09-14 14:08:47 +02:00
Martin Gräßlin
c71b002b24 [wayland] Fix release of TabBox on Wayland
Summary:
The interaction is changed to trigger the check for release from the
TabBoxInputFilter instead of reacting on modifier changes. That way
it's possible to check for the relevant modifiers getting released
instead of getting all modifiers in. Also this means that the checks
are only performed when relevant.

BUG: 368590

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2773
2016-09-14 13:26:58 +02:00
l10n daemon script
b56a28e19c 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"
2016-09-14 09:23:44 +00:00
Martin Gräßlin
ded90756fb Fix interaction between decoration and fullscreen ShellClient
Summary:
A fullscreen ShellClient still had a decoration which was caused by
a combination of several bugs:
* when going to/from fullscreen the decoration was not update
* noBorder did not return true for a fullscreen window
* wl_shell emits fullscreen changed and maximized changed

Comparing to X11 Client both is done. So ShellClient needs to do the
same. This ensures that the correct geometry is requested when going
to fullscreen.

BUG: 366764

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2751
2016-09-14 10:53:12 +02:00
Martin Gräßlin
d910217bb9 [effects] Repaint expandedGeometry in HighlightWindowsEffect
Summary:
The highlight windows effect tried to trigger repaints with the shadow
included by having an hardcoded pixel offset. This of course breaks if
the shadow is larger than the hardcoded value.

The reason presented on why it was done like that is no longer true and
in the effects the actual visible area including decorations and shadows
is available through the expandedGeometry.

BUG: 368495

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2748
2016-09-14 10:44:07 +02:00
Martin Gräßlin
4235871667 Remove not-wanted modifiers prior to evaluating global shortcuts
Summary:
When triggering global shortcuts we are more interested in the hold
keys than the currently active modifiers. E.g. capslock should not
be seen as "shift is hold". Similar we need to remove consumed
modifiers. Shift+5 is % and not Shift+% - the shift modifier is
consumed and needs to be removed from shortcut evaluation.

To support this we need to have the actual state directly from
xkbcommon. Thus a new method is added which exposes the modifiers
relevant for global shortcut matching. In addition on every key press
all consumed modifiers are calculated and kept so that they can be
used for shortcut matching.

In addition a workaround is added for Backtab. Similar workaround
exists in kglobalaccel for X11. The problem is that our shortcuts are
stored incorrectly: Shift+Tab instead of Backtab. Thus a mapping back
is required. To make everything worse KWin registers the wrong key
sequence "Alt+Shift+Backtab" which doesn't make any sense and is
broken on X11 at least.

The workaround supports both special cases. The one for Backtab should
be turned into Shift+Tab and also KWin's special case of adding shift
to backtab.

CCBUG: 368581

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2768
2016-09-14 10:25:13 +02:00
Martin Gräßlin
64126a9717 Fix updating layer when setting a ShellClient to fullscreen
Summary:
The call to update the layer was performed before adjusting to
fullscreen. Thus the layer didn't get updated at all as it still
evaluated to "not fullscreen".

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2758
2016-09-14 10:24:46 +02:00
Martin Gräßlin
0bb1f2e7bf Make WindowPixmap::isValid virtual and override in concrete implementation
Summary:
If a buffer gets destroyed the texture created from it is still valid.
In such a situation the OpenGLWindowPixmap should return true for isValid
and not false as it did. Similar in QPainter compositor the pixmap is
valid if there is an image copied from the buffer.

This change ensures that for example minimizing an XWayland window
still has a texture during the minimize animation.

BUG: 368440

Test Plan:
Minimize animation plays for X windows and minimized windows
are shown in present windows.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2724
2016-09-14 10:23:35 +02:00
Martin Gräßlin
cdcee88b48 [autotests/integration] Add a global shortcuts test
New test case to verify that global shortcut triggering works correctly.
First test case is to verify that consumed modifiers do not break the
shortcut. E.g. a shortcut registered for % should trigger on Shift+5 on
us layout. For that the modifier needs to be consumed, otherwise it's
Shift+% and doesn't trigger. As the test shows this is currently the
case.
2016-09-14 09:13:36 +02:00
Martin Gräßlin
bf7c670444 [autotests] Wrap integration tests in dbus-session-run
Each test needs a dedicated dbus session as the test needs to register
services (e.g. kglobalaccel) and might fail if that cannot be registered.

Due to the wrapping in another command the test need to make sure that
any process they start terminates before them. E.g. the activities test
must stop kactivitymanagerd in cleanupTestCase, otherwise the test times
out.
2016-09-14 07:59:14 +02:00
Martin Gräßlin
a69300f762 [autotests/integration] Test basic working of Alt+Tab and Alt+Shift+Tab
Dedicated test methods for Alt+Tab and Alt+Shift+Tab. Both open three
windows and simulate one press with opening the TabBox. Alt+Tab should
move to the previous window in the chain, Alt+Shift+tab to the last
window in the chain.
2016-09-13 16:11:58 +02:00