Commit Graph

15840 Commits (8510f31340ac78d76df69a3bccb001f610613913)

Author SHA1 Message Date
Marco Martin 8510f31340 don't double delete m_spy
dtor not needed
BUG:388910
2018-01-15 10:56:05 +01:00
Fabian Vogt eb69e87288 Manually take XKB_DEFAULT_{RULES,MODEL,LAYOUT,VARIANT,OPTIONS} into account
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
2018-01-15 08:56:33 +01:00
Martin Flöser 42b099355c Add support for initial apply rules for skip (taskbar|pager|switcher)
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
2018-01-14 11:19:47 +01:00
Martin Flöser 85ef2831db Do not call into NETWinInfo in AbstractClient::setSkipPager
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
2018-01-14 11:19:19 +01:00
l10n daemon script f7f0a64db0 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"
2018-01-14 04:53:24 +01:00
Martin Flöser b8f4361847 Disable KActivities integration on Wayland
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
2018-01-13 16:58:43 +01:00
Martin Flöser 0d0a9ebe9a Require frameworks 5.42 2018-01-13 16:17:46 +01:00
Fabian Vogt e302f87598 Properly detect Gallium drivers with newer Mesa
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
2018-01-12 09:05:03 +01:00
l10n daemon script f597615fa4 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"
2018-01-12 04:58:41 +01:00
Marco Martin 1be5256b1b A basic TabletModeManager
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
2018-01-11 13:11:00 +01:00
Martin Flöser b7ad4bcf88 Keep fullscreen windows in active layer based on transients not the group
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
2018-01-10 17:44:00 +01:00
Martin Flöser b002b27903 Simulate user activity on fake input events
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
2018-01-10 17:43:42 +01:00
David Edmundson 04dbafd75e Fix Plastik bottom and right border
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
2018-01-10 12:11:09 +00:00
Martin Flöser d2a9232ad3 Pass SwitchEvent from LibInput through KWin and add to DebugConsole
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
2018-01-09 19:32:58 +01:00
l10n daemon script 8a3128c8cf 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"
2018-01-09 05:06:46 +01:00
Kai Uwe Broulik 7ca8771d12 [TabBox] Don't show "Show desktop" window when cycling through application windows
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
2018-01-08 10:31:16 +01:00
l10n daemon script 655f184a61 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"
2018-01-07 05:00:26 +01:00
Martin Flöser 87ebfd1517 [autotests] Add test case for fullscreen window with groups
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
2018-01-06 10:45:44 +01:00
l10n daemon script 7764de0470 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"
2018-01-06 04:52:25 +01:00
Nerdopolis Turfwalker f6e93aedb2 logind: Add a function that detects the logind seat.
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
2018-01-05 22:46:39 +01:00
Bhushan Shah 913d6cca47 Fix cmake call
VERSION_GREATER_EQUAL is not available for cmake version we depend on
2018-01-05 20:20:07 +05:30
Laurent Montel 1fa8c08088 Remove obsolete reviewboardrc file 2018-01-05 13:55:15 +01:00
Laurent Montel f2761b47ef Remove obsolete reviewboardrc file 2018-01-05 13:55:14 +01:00
l10n daemon script 301f7199fb 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"
2018-01-05 05:03:50 +01:00
David Edmundson 01d6878dc2 Add explicit protocol for colour scheme management
Summary:
To replace the deprecated/broken qt extended surface

BUG: 385214

Test Plan: Ran test in plasma-integration

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9660
2018-01-04 18:32:18 +00:00
Martin Flöser ac2f41c86d [libinput] Add support for switch devices and events
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
2018-01-04 18:05:44 +01:00
l10n daemon script a252ff9656 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"
2018-01-04 04:53:47 +01:00
Martin Flöser 6ab625ed97 Ignore outputOnly QWindows for pointer and touch events
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
2018-01-03 21:15:34 +01:00
Martin Flöser f5f1f6ceb4 Don't send keyboard events to QWindows which have outputOnly property set
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
2018-01-03 21:13:23 +01:00
l10n daemon script 196423d267 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"
2018-01-03 06:51:15 +01:00
l10n daemon script 7effd6bf19 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"
2018-01-02 04:47:58 +01:00
Vlad Zagorodniy 20780c6f21 [effects/slide] Handle moving clients
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
2018-01-01 17:12:52 +02:00
Vlad Zagorodniy 8a02a802ae [effects/slide] Add 'Duration' option
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
2018-01-01 16:54:02 +02:00
l10n daemon script 880dd6dc0b 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-12-31 04:52:32 +01:00
l10n daemon script 6c6866a29a 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-12-30 04:46:59 +01:00
Nathaniel Graham 819230d495 Improve some strings and UI elements in KWin KCM
Summary:
BUG: 386571
BUG: 386574
BUG: 386576

Implemented some of @abetts' string change and UI suggestions in the above bugs.

Test Plan:
Tested in KDE Neon:

{F5540279}

{F5540277}

{F5540278}

Reviewers: abetts, #vdg, #kwin, davidedmundson, graesslin, apol

Reviewed By: abetts, #vdg, davidedmundson, apol

Subscribers: apol, jriddell, luebking, graesslin, kwin, abetts

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8682
2017-12-29 10:22:20 -07:00
l10n daemon script 50b948134c 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-12-28 04:45:41 +01:00
Martin Flöser a561f91d29 Add missing include
Fix build.
2017-12-27 09:50:39 +01:00
Martin Flöser e0b1a5715b Add DBus interface to OrientationSensor and a persistent configuration
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
2017-12-26 22:02:47 +01:00
l10n daemon script 0abc5e020f 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-12-25 04:44:28 +01:00
Martin Flöser ff97938fbc Add missing include for std::round
We had a compile failure on openSuse on build.kde.org. This is a try to
fix the failure with adding the include.
2017-12-24 12:54:27 +01:00
Martin Flöser 68698b4201 [libinput] Find screen for touch screen devices and calibrate accordingly
Summary:
This change finds the screen for a touch screen device based on:
 * number available screens
 * output name defined on the touch screen device
 * internal screen
 * and physical size

The id of the screen is stored in the Device allowing to adjust the
touch points accordingly. This means instead of transferring to the
combined display size the touch points are transferred into the output
space and the position of the output is added. Thus in a multi screen
system the touch points are properly mapped to the output.

Furthermore the screen orientation is passed to the Device and a
calibration matrix is set accordingly. Thus a transformed screen has the
touch screen transformed accordingly.

Please note that this only affects libinput on Wayland and not on X11!
The x11 standalone platform needs to gain similar code.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8748
2017-12-23 10:18:55 +01:00
David Edmundson 965c30f4d4 Register a fake appmenu UI for the appmenu test 2017-12-22 17:23:44 +00:00
David Edmundson 2f9d0bd626 Expliit QString use with QCOMPARE.
Fix builds on older Qt.
2017-12-22 15:47:43 +00:00
David Edmundson ee28104c7a Port to new AppMenu iface
Plus test

Test Plan:
Ran kwin with menus and patched QPT
Ran test

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9262
2017-12-22 14:38:31 +00:00
l10n daemon script edb2654228 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-12-22 05:11:16 +01:00
Kai Uwe Broulik dab11a92f1 Drop warning about unimplemented Screens::scale
Otherwise spams your log telling you to implement it.
We don't support per-screen dpi on X and never will, so this is a pointless warning.

Differential Revision: https://phabricator.kde.org/D9080
2017-12-21 14:08:36 +01:00
l10n daemon script be4cde23ec 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-12-20 07:06:47 +01:00
Friedrich W. H. Kossebau 6e10f99d16 Remove no longer needed moc include 2017-12-19 02:19:37 +01:00
Milian Wolff cd544890ce Fix build with CMake 3.10
Looks like a classic false-positive, but this makes the compile
pass for me without making the code harder to read:

AutoMoc error
-------------
  "/ssd/milian/projects/kf5/src/kde/workspace/kwin/kcmkwin/kwinscripts/main.cpp"
The file contains a K_PLUGIN_FACTORY macro, but does not include "main.moc"!
Consider to
 - add #include "main.moc"
 - enable SKIP_AUTOMOC for this file

So we just add the include and then get rid of the duplicate
definition of the plugin factory and the problem is resolved.
2017-12-18 11:41:37 +01:00