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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
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.
Summary:
On Wayland compositing is required. It doesn't make any sense to offer
the user to disable the compositor or to allow windows to block
compositing.
The Compositor DBus interface gains a new property whether the platform
requires compositing. This is queried by the compositing kcm and based
on that the two mentioned options get hidden and not stored to config
file.
Test Plan: Opened the KCM on Wayland
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2586
Summary:
From feedback we got it seems that not all users agree to games and
other applications blocking compositing. Some users prefer to have
compositing always on even if this gives a small performance penelity.
This change introduces a dedicated config option to specify whether games
are allowed to block compositing. By default this option is enabled.
The setting can be overwritten with a window specific rule. So usecases
like all windows except this very specific one are supported.
In the user interface the config option is shown where previously the
unredirect fullscreen option was shown.
Test Plan:
Run a game which should block compositing, verified it blocks.
Changed the setting, run the game again, verified it doesn't block. And
once more for with allowing to block.
Reviewers: #kwin, #plasma_on_wayland, #vdg
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2584
Summary:
We used to have a toLower when reading the rule. This was removed with
4f7edb8 which turned it into a case sensitive matching to fix a
regression.
But this created another regression: existing rules written lower case
are no longer matched.
This change makes the role matching case insensitive again.
BUG: 367554
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2574
Summary:
So far TabBox used highlight windows by passing window ids around through
an X property. This doesn't work on Wayland where we don't have window
ids for our TabBox and the Wayland windows.
This change introduces a new Effect::Feature for HighlightWindows which
the HighlightWindowsEffect provides. The EffectsHandlerImpl has a new
method to highlightWindows which it delegates to that effect if it is
loaded by invoking a new performFeature method.
The TabBoxHandler now passes the highlighting to the effects system
instead of updating the x11 property. Thus this works on Wayland and
at the same time improves the X11 side by no longer having to go through
the property protocol.
Test Plan: Verified that Alt+Tab highlights the windows on Wayland correctly.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2630
In addition to normal client to fullscreen two more cases are added
which also go from a server side decorated window to fullscreen.
This highlights an issue that an incorrect geometry is requested.
CCBUG: 366764
Summary:
In order to add more tabs which can further help monitoring how KWin
handles some aspects the DebugConsole is changed to not take keyboard
input. This means it can only be navigated using pointer device or touch
screen.
This is needed for adding a new tab to monitor clipboard changes. On
Wayland sometimes windows don't get the clipboard, so it would be
helpful to have a debug monitor to see when the clipboard changes. But
for that debug console window may not take keyboard events.
To support this DebugConsole sets the WA_ShowWithoutActivating attribute
which gets honored by the InternalWindowEventFilter and does not forward
key events to such windows.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2620
Summary:
A not shown window may accept focus (e.g. when minimized). Given that
the condition was wrong and broke when making minimized windows not
shown.
This change takes the idea of not passing focus to a closing or unmapped
window directly into acceptsFocus. Which also means that this condition
now works for xdg_shell windows.
BUG: 368673
Reviewers: #kwin, #plasma_on_wayland, bshah
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2745
Summary:
The self test fails with NVDIDA 370.23 or newer on Quadro hardware.
Most likely there is a bug in our code as the same things work later on.
But without the hardware we are not able to reproduce and investigate
properly. Given that all we currently can do is to skip the self test.
We encourage users to investigate this properly and to help us to
identify the root issue, so that we can fix it.
CCBUG: 367766
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2744
Summary:
KWin always has a few internal windows around which are not visible.
A QWindow created somewhere, but not shown. Such windows should not
be part of the stacking order.
If they are it breaks code which looks at the top most window in the
stacking order like e.g. SlidebackEffect.
This change ensures that the stacking order gets updated whenever a
ShellClient gets hidden and that internal windows with isShown being
false are excluded from the stacking order.
BUG: 364483
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2636
The X11 specific tests need to run on QT_QPA_PLATFORM xcb otherwise
they will crash. To enforce this without having to replace QTEST_MAIN
a Q_CONSTRUCTOR_FUNCTION is used to invoke a function which does nothing
except setting the env variable.
This causes an assert with debug build of Qt due to threading issues.
We don't need the setParent call as we use deleteLater when a device
gets removed.
Reviewed-by: Martin Gräßlin
Summary:
The restore geometry gets initially set to 0/0xsize before the placement
is done. When going into updateClientArea and then afterwards into
AbstractClient::checkWorkspacePosition the geometry restory is used for
calculating the new position. This results in windows getting moved to
0/0 when e.g. plugging in a new screen or a panel changes, etc.
This change ensures that the restore geometry is set correctly after the
first placement.
BUG: 366696
Reviewers: #kwin, #plasma_on_wayland, bshah
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2627
This is Milestone 1 of full support of Atomic Mode Setting (AMS) and
Universal Planes in the KWin DRM backend.
With Milestone 1 we can use the primary plane of a DRM output and do an
AMS commit (this means mode setting aswell as page flipping), if the
driver supports it. Until now the functionality is only tested on Intel
graphics. You need the drm-next kernel for most recent DRM kernel
developments. As boot option set "i915.nuclear_pageflip". Additionally
at the moment AMS is still hidden behind the environment variable
KWIN_DRM_AMS. Set it, if you want to try out AMS.
What needs to be done next: Make it possible to transfer EGL buffers
directly to planes and implement logic for deciding about using a plane
or not for a specific buffer.
You can read more about it on LWN:
https://lwn.net/Articles/653071
And on Martin's blog:
https://blog.martin-graesslin.com/blog/2015/08/layered-compositing/
I used as model previous work by Daniel Stone for Weston:
https://git.collabora.com/cgit/user/daniels/weston.git
Reviewed-by: mgraesslin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2370