Summary:
With GTK applications our code showed issues. With GTK the sequence for
a menu or dialog window is:
1. create surface
2. create server side decoration
3. request csd
4. create xdg_shell_surface
Which result in KWin to have the ServerSideDecoration object being
created before the ShellClient is created. The connect for mode changed
happens in ShellClient, which is too late to catch that the window
requested client side decoration. Thus KWin created a decoration about
things such as a menu.
This change moves the acknowledge of the mode to WaylandServer. As we
anyway always acknowledge the requested mode we can also do it there and
don't require ShellClient to be present. Thus when the ShellClient is
created the mode is properly reflected and no decoration is created.
BUG: 389117
FIXED-IN: 5.12.0
Test Plan: Played a lot with evince
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9967
Summary:
According to callgrind, checking kwin in release with debug symbols,
22% of cpu time in the method hasTransientInternal is spent doing
a cast to Client *, while at the begining of the method, the cast to
const Client * only uses 1.0x%.
Test Plan:
The workload was just show 50 messagebox copying small files and being
unable to change the permissions.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9982
Summary:
It is known to create problems especially on multi-screen and is not as
important on Wayland as it used to be on X11 thanks to things like
buffer age and in general better rendering.
Test Plan: Opened the config module and verified that the option is
hidden
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9879
Summary:
As kwin_wayland can have the CAP_SYS_NICE capability, libxkbcommon does not
read environment variables (see secure_getenv).
So process them here, in the same way xkb_context_sanitize_rule_names would.
BUG: 388249
Test Plan: kwin_wayland has the capability set, keyboard layout is applied correctly.
Reviewers: #plasma, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9873
Summary: This adds support for those set rules in ShellClient.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9866
Summary:
There's a call to a virtual doSetSkipPager for performing this call and
Client implements it with the code which now is removed.
This fixes a crash when using setSkipPager for a Wayland window.
Test Plan:
Crash which happens with a new test case (see dependent phab
request) is fixed.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9865
Once again KActivities causes a delay in the startup of KWin. This is
not the first time it happens, that has been a problem since the start
of the Wayland project.
In the past we added a compile time switch due to that and added a
runtime switch once it stoped freezing (20a9a2a247).
And now it broke again, so let's disable again.
KActivities doesn't make sense on Wayland anyway as there is no activity
support for Wayland windows. Once KActivities is able to be used without
freezing KWin on startup and being able to ensure that it won't break
again we can reenable. But I expect guarantees about that. This must be
ensured by proper autotest support to verify that in future usage of
KActivities in the display manager doesn't freeze it.
This is maintainer decision, due to that no pre-commit review.
CCMAIL: plasma-devel@kde.org
BUG: 388628
Summary:
The renderer string does not contain "Gallium 0.4 on" anymore,
instead it directly contains the gallium driver's name.
So assume that every unknown renderer is a gallium driver.
Test Plan: Added a testcase, it succeeds only with this patch.
Reviewers: #plasma, graesslin
Subscribers: kwin, plasma-devel, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9495
Summary:
depends from D9521
listens to switch events and updates the tablet mode status
which is exposed to dbus in the org.kde.KWin.TabletModeManager
interface
Test Plan:
as hardware support is limited, testing of clients
so far is done by the setter in the dbus property,
which should be removed from the final version.
It has been tested to successfully work on a Thinkpad.
Reviewers: #plasma, #kwin, graesslin
Reviewed By: #plasma, #kwin, graesslin
Subscribers: graesslin, davidedmundson, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9764
Summary:
So far a not-active fullscreen X11 window was kept in the active layer if
the newly activated window is in the same group (that is same client
leader). For example a fullscreen X11 kwrite window is in the active layer
if another kwrite window is active. The two kwrite windows obviously
don't have anything to do with each other, but are in the same group.
This creates problems as it's not possible to raise other windows above
the active not-fullscreen kwrite window. E.g. the panel is stacked below.
The idea behind the check makes sense: if a fullscreen window opens
another window (e.g. a configuration dialog) it should not be put back
to normal layer. Thus the check is adjusted whether the new active
window is a transient to the fullscreen window. Thus the intention is
still the same, but does not cause the problems.
As the code now does not need to differentiate between X11 and Wayland
windows (group only on X11) the Client specific implementation is
removed and the method unvirtual'ed.
BUG: 388310
FIXED-IN: 5.12.0
Test Plan: Test passes
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9699
Summary:
This ensures that using KDE Connect to control input properly inhibits
idle timeouts.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9555
Summary:
x and y are always relative to the parent, adding parent.width to
calculate the position doesn't make sense.
Original author meant just "x: parent.width-1"
But we may as well just use anchors. Programatically it comes out the
same.
Test Plan:
No more weird vertical lines in the KCM when view is slightly less than 2 previews wide.
Modded colour to hardcoded "red" for easier visualisation, checked it looked ok when set as a real deco.
Reviewers: #plasma
Subscribers: plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9776
Summary:
This change introduces a new SwitchEvent and passes it through the
InputEventSpy and InputEventFilter. The DebugConsoleFilter implements it
so that the events can be monitored in the debug console.
Test Plan: Untested as my only device with such switches has too old libinput
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9521
When I'm explicitly cycling through the windows of an application it makes no sense to show the "global" desktop window.
BUG: 378662
FIXED-IN: 5.12.0
Differential Revision: https://phabricator.kde.org/D9661
When an X11 window is raised to fullscreen it gets set to active layer.
When another window gets activated then it goes back to normal layer.
But when a window of the same group gets activated the fullscreen window
stays in the active layer. Due to that it is not possible to raise other
windows above the fullscreen window.
This just adds a test case exposing the problematic area.
CCBUG: 388310
Summary:
This will allow other parts of kwin to get the current logind seat that this instance is running under
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, anthonyfieroni, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9551
Summary:
This change adds support for the switch devices introduces with libinput
1.7 (lid) and 1.9 (tablet mode). So far it's not yet used internally in
KWin, but only exposed through the Device and Events.
As KWin currently only requires libinput 1.5 and we are rather late in
the release cycle the new functionality is ifdef'ed. The requirement
will be raised once master is 5.13. It is already available on
build.kde.org, but e.g. Neon only has 1.6.
The switch events are interesting as they report whether the lid is
closed (might be interesting for e.g. powerdevil) and whether a
convertible is in tablet mode (supported for e.g. Lenovo Yogas with
recent kernel). This can be used by KWin internally to enable/disable
the virtual keyboard. And can be exposed globally to switch to Plasma
Mobile shell in future.
Test Plan:
Only through test case as my Lenovo Yoga uses Neon which has a
too old libinput
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9516
Summary:
The idea is to be output only, so also ignore for pointer and touch.
This is similar to the previous commit for keyboard events.
BUG: 386954
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9647
Summary:
PlasmaCore.Dialog has a property outputOnly. This is for example used in
KWin's OnScreenNotification. If that property is set KWin should not send
any key events to it, just like for windows with _q_showWithoutActivating.
BUG: 388112
Test Plan: Not yet
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9618
Summary:
Currently, slide effect doesn't handle a case when there
is a moving client. This results in having window jumps.
This commit fixes it by fixing position of the moving client
during switching to another desktop.
Test Plan: * send window one desktop to the left/right using shortcuts
Reviewers: #kwin, #plasma, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9487
Summary:
At the moment, there is no way to tweak duration of the slide animation.
This change adds a configuration module so it is possible to change
the duration.
Test Plan:
* enable virtual desktops
* go to `System Settings > Desktop Behaviour > Desktop Effects`
and select Slide effect under "Virtual Desktop Switching Animation"
* click settings/options button and change duration
Reviewers: #kwin, #plasma, graesslin
Reviewed By: #kwin, #plasma, graesslin
Subscribers: graesslin, plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9382
Summary:
The initial state for user enabled is now read from config. In addition
a DBus interface is provided exporting this property. This allows
KScreen to determine whether automatic screen rotation is available and
whether the user has it enabled or not.
Furthermore KScreen can change the property and this gets stored into
the configuration. Thus KScreen can offer a user interface to
enable/disable automatic screen rotation as well as enabling/disabling
the manual rotation based on the current user settings.
Test Plan:
Not yet tested, coded on the system which doesn't have an
orientation sensor
Reviewers: #kwin, #plasma, sebas, davidedmundson
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D8738