Commit graph

588 commits

Author SHA1 Message Date
Jonathan Riddell
cfe13c5a4f Update version number for 5.10.2
GIT_SILENT
2017-06-13 18:31:37 +01:00
Jonathan Riddell
6d9a7142e5 Update version number for 5.10.1
GIT_SILENT
2017-06-06 11:42:40 +01:00
Jonathan Riddell
c5861b99eb Update version number for 5.10.0
GIT_SILENT
2017-05-25 19:30:36 +01:00
Jonathan Riddell
6d1b61c1a7 Update version number for 5.9.95
GIT_SILENT
2017-05-11 14:38:49 +01:00
David Edmundson
55933d9cc9 Update min KF5 version 2017-05-08 12:22:09 +02:00
Martin Gräßlin
572f730e8e [helper] Terminate xclipboardsyncer if kwin_wayland goes down
Summary:
Normally the xclipboardsyncer should terminate because the socket
becomes unusable. But we have reports of it not really going down and
running amok.

In order to prevent such situations this change registers SIGTERM to be
sent to xclipboardsyncer when the parent process (that is kwin_wayland)
dies in whatever way. This ensures that xclipboardsyncer cannot become
an orphan.

BUG: 371862

Test Plan: Only compile tested, no way to get into the problematic situation

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5589
2017-05-05 19:17:11 +02:00
David Edmundson
62a3b193bc Set correct KF5_MIN_VERSION 2017-05-01 13:15:17 +01:00
Martin Gräßlin
bf99d9ffdd Introduce support for keyboard layout switching policies
Summary:
This change introduces the initial support for keyboard layout switching
policies like in the X11 session. This first change only adds support for
Global and Virtual Desktop policy. This means the current layout is
stored in context to the current virtual desktop. Whenever one changes
the virtual desktop the previous layout is restored. If the user has not
yet navigated to this virtual desktop a switch to default layout is
performed.

This is the first code interacting with the new Virtual Desktop API which
is not based on integer ids. To fully support this the API is slightly
extended.

Test Plan: Added test case

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5301
2017-04-22 08:15:25 +02:00
Martin Gräßlin
1193b0da77 Initial support for popup window handling
Summary:
So far KWin did not properly handle popup windows. That is when a popup
surface got created and a click outside the surface happened KWin did not
send out the popupDone Wayland event.

This change makes KWin aware of whether a surface is a popup and tracks
through a new PopupInputFilter whether there are popup windows. In case
there are popups the new filter waits for mouse press events and cancels
the popups if the press does not happen on any surface belonging to the
same client. To quote the relevant section of the Wayland documentation:

    The popup grab continues until the window is destroyed or a mouse
    button is pressed in any other client's window. A click in any of the
    client's surfaces is reported as normal, however, clicks in other
    clients' surfaces will be discarded and trigger the callback.

So far the support is still incomplete. Not yet implemented are:
 * support xdg_shell popup windows
 * verifying whether the popup is allowed to be a popup
 * cancel the popup on more global interactions like screen lock or
   kwin effect

BUG: 366609
FIXED-IN: 5.10

Test Plan: Auto test and manual testing with QtWayland client

Reviewers: #plasma, #kwin

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5177
2017-04-07 16:14:50 +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
81fac15874 Merge branch 'Plasma/5.9' 2017-02-17 15:00:59 +01:00
Martin Gräßlin
32ec309e18 We need Breeze 5.9 2017-02-17 14:59:20 +01:00
Martin Gräßlin
354241e1ea Merge branch 'Plasma/5.8' into Plasma/5.9 2017-02-17 14:58:32 +01:00
Martin Gräßlin
cb481b4922 Find minimum required Breeze version instead of current version
Summary:
So far KWin put a version requirement on Breeze which is the current
version number of KWin. This is technically correct, but distributions
seem to have problems with it. E.g. I noticed twice in Debian testing
that kwin defaults to Plastik which happens when Breeze is not found.
I reported it, it got fixed, now it's again broken.

Thus I think that distributions have problems with the requirement of
building Breeze prior to KWin. As KWin does not depend on the minor
version, let's depend only on the actual required version, which is
5.8 in the 5.8 branch, 5.9 in the 5.9 branch and master.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4644
2017-02-17 07:12:57 +01:00
Martin Gräßlin
58f26b8f55 Split KWin::Xkb into a dedicated .h and .cpp
Summary: Closes T5221

Test Plan: Compiles

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Maniphest Tasks: T5221

Differential Revision: https://phabricator.kde.org/D4623
2017-02-15 17:48:55 +01:00
Martin Gräßlin
65ddd32d1a Split modifier only handling into a dedicated InputEventSpy
Summary:
The functionality regarding triggering modifier only shortcuts is moved
out of Xkb - where it doesn't belong to - and is turned into an input
event spy listening for the changes it is interested in. Previously
the state got queried by asking e.g. for the pressed buttons, now it's
tracked directly.

The X11 side needs a larger change due to that as now pushing the events
into Xkb does not trigger modifier only shortcuts any more. Instead the
"normal" way through the platform API needs to be used which triggers the
processing of filters and spies.

The problem here is that our redirections only process events if they are
inited and that only happens on Wayland. We cannot call init on them as
that would create all the Wayland filters and spies and processing would
probably break. As an intermediate solution the spies are now processed
and there we know that it won't matter. A future solution would be to
remove the init checks completely and just send through both filters and
spies and ensure that on X11 only the supported ones are loaded.

Closes T5220

Test Plan: Tested on Wayland and X11

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Maniphest Tasks: T5220

Differential Revision: https://phabricator.kde.org/D4578
2017-02-14 17:02:18 +01:00
Jonathan Riddell
f972770afa Update version number for 5.9.2
GIT_SILENT
2017-02-14 12:19:57 +00:00
Martin Gräßlin
1a9ece7cd4 Require C++11 through cmake
Summary:
This replaces the previous solution to require at least gcc 4.8 which
did not cover clang. As cmake has a proper way to check for 11, let's
use that.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4486
2017-02-07 21:28:51 +01:00
Martin Gräßlin
16647c3a3c Require Qt 5.7 and remove pre-5.7 code
Summary:
Increases minimum Qt version to 5.7. This allows to drop the pre-5.7
virtual keyboard and various ifdefs for now unsupported versions.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4485
2017-02-07 20:43:19 +01:00
Jonathan Riddell
41bd8d0de9 Update version number for 5.9.1
GIT_SILENT
2017-02-07 11:09:59 +00:00
Martin Gräßlin
eb92477210 Split Keyboard Repeat handling into a dedicated InputEventSpy
Summary:
So far the keyboard repeat handling was triggered directly from
KeyboardInputRedirection::processKey. With the introduction of
InputEventSpies it is no longer required to be done like that, we can
split it out into a dedicated spy.

This means that processKey only has to care about processing the key
and allows us to better extend in future. So far keyboard repeat is
only functional for libinput based platforms. But it should also be
possible to use it in nested setups. By splitting it out we can
prepare for that.

Test Plan: Auto-test using repeat still passes

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4304
2017-01-27 16:03:37 +01:00
Jonathan Riddell
7e54ec82a4 Update version number for 5.9.0
GIT_SILENT
2017-01-26 11:06:39 +00:00
Marco Martin
89117c695d Merge branch 'Plasma/5.9' 2017-01-20 15:35:59 +01:00
Marco Martin
405518c41d use proper packagestructures
Summary:
as the plasmapkg2 utility is dead, scripts and tabboxes couldn't
be installed anymore, as plasmapkg2 was launched with an hardcoded
package type (and had a bunch of custom code for it)
and no packagestructure for the relevant package types existed.

the port of scripts and tabboxes to kpackage in kwin is quite
incomplete and somewhat strange (given the fact that was started by
looking manually for the file as it couldn't link to libplasma)

this makes things a bit better as now scripts and tabboxes have an actual
package structure, making it installable by kpackagetool5.
in the future, the port should be completed and replace all the manual lookup
of files with package::filePath as it should work now given that valid
structures exist

BUG:374766

Test Plan:
tabbox plugins and kwin scripts can be installed from knewstuff
again and can be successfully loaded

Reviewers: #plasma, graesslin, subdiff

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4202
2017-01-20 15:34:56 +01:00
Martin Gräßlin
d6c0a5414e Split implementation of keyboard layout handling into a dedicated class
Summary:
So far the implementation of keyboard layout handling was split between
KeyboardInputRedirection and Xkb. KeyboardInputRedirection registered
the global shortcut and did the handling for layout switch and config
changes. Xkb did the notification on layout change.

Layout changes can nowadays be detected through an InputEventSpy. It
can only happen after a key change or an explicit layout switch. Thus
it does not need to be in Xkb anymore which allows to reduce Xkb to
only care about the Xkb keymap and state tracking.

This change introduces a new class KeyboardLayout which is an
InputEventSpy and takes over the task of the layout change notification
from Xkb and the layout management from KeyboardInputRedirection. Thus
everything related to management of keyboard layout is together in one
class.

This allows in future to add unit test to it (requires further cleanup
of Xkb to be able to use it and drop the InputRedirection dependency) and
opens the possibility to also take over keyboard layout management on X11
for the Plasma desktop.

Test Plan: Manual testing

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4135
2017-01-18 17:52:45 +01:00
Jonathan Riddell
a7fc7c1e64 Update version number for 5.9.90
GIT_SILENT
2017-01-12 15:36:40 +00:00
Jonathan Riddell
4d3f6862bc Update version number for 5.8.95
GIT_SILENT
2017-01-12 11:36:23 +00:00
Kai Uwe Broulik
93938d60b8 Restore global menu support
This brings back global menu support in KWin.
The DBusMenu infrastructure is different that we just read the DBus service name and
menu object path from the windows rather than passing around window IDs on DBus which
won't work on Wayland.

Differential Revision: https://phabricator.kde.org/D3089
2017-01-11 10:21:03 +01:00
Martin Gräßlin
a9ac70f007 It makes sense to actually also build the new input_event_spy.cpp
Sometimes C++ surprises me. How could that compile without being in
the build set?
2016-12-30 19:32:47 +01:00
Martin Gräßlin
d1fdb9a02f Use new xkbcommon API for consumed modifiers
Summary:
This change removes the workaround added with
421824b654.

Xkbcommon 0.7 introduces the needed API to make this work without a
workaround.

Test Plan: Test case still passes

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3809
2016-12-27 18:18:17 +01:00
Jonathan Riddell
4d3809f8e3 Update version number for 5.8.5
GIT_SILENT
2016-12-27 09:27:02 +00:00
Martin Gräßlin
07c6878ff0 Introduce a KWin internal on-screen-notification service
Summary:
Recently we noticed that there are multiple areas where KWin needs to
inform the user about how to operate. Examples are:
* Screenshot
* ColorPicker
* Pointer constraint enabled
* Pointer constraint about to be removed
* Kill Window

For Screenshot and ColorPicker we used an EffectFrame to render it. But
this is not an optimal solution as it's lacking many features we would
need. We cannot properly use it from within KWin core, we cannot
implement features like hide on mouse over, etc. etc.

This change introduces an OnScreenNotification which supports:
* showing an icon
* showing a message
* timeout

It is Qml styled, so that it can be easily adjusted. This is a big
improvement over the EffectFrame solution. The Qml file creates a Plasma
Dialog of type OSD. Thus KWin places it like the normal OSD windows and
also looks kind of similar. In the case of KWin the focus is more on the
message, than an icon, so the icon is placed left of the text.

While the OnScreenNotification is supposed to be used like a singleton,
it doesn't use the KWin singleton pattern. Instead a small wrapper
namespace OSD is introduced which provides a convenient API for KWin
internal areas to show/hide the notification. By not using the KWin
singleton pattern, the OnScreenNotification does not depend on any other
parts of KWin and can be easily unit-tested.

A few features are still missing and will be added in further commits:
* hide-out on mouse over
* optional skip close animation (needed for screenshot)
* X11 support (not that important as it's mostly for Wayland features)

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3723
2016-12-21 19:43:49 +01:00
Roman Gilg
7f16d83e04 [libinput] Add more support for pointer devices, in particular touchpads
This patch is made in preparation for the Touchpad KCM for Wayland.

Summary:
* KWin has a Libinput version requirement bump to 1.5
* new isTouchpad property to distinguish touchpads from mice
* new lmrTapButtonMap property
* new disableWhileTyping property
* new pointerAccelerationProfile property
* new defaultPointerAcceleration property
* save to config mechanism added for new propertys and pointerAcceleration
* new D-Bus interface org.kde.KWin.InputDeviceManager and method devicesSysNames
* removed unnecessary additional D-Bus service name org.kde.KWin.InputDevice
* changing acceleration in the Mouse KCM doesn't influence touchpads anymore

Reviewers: #kwin, #plasma, davidedmundson

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3479
2016-12-02 14:58:56 +01:00
David Edmundson
d06098ff30 Fix merge markers 2016-11-28 10:17:07 +00:00
David Edmundson
f34222e060 Merge branch 'Plasma/5.8' 2016-11-28 09:28:01 +00:00
Martin Gräßlin
0dc500fe94 Move linking to DL_LIBRARY to x11standalone platform
Summary:
It's only needed by the GLX backend, so only find if we have GLX at all
and only link where needed. As it was handled incorrectly before, it's
now using proper ifdef.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3448
2016-11-22 14:22:06 +01:00
Jonathan Riddell
09dfba421b Update version number for 5.8.4
GIT_SILENT
2016-11-22 09:48:07 +00:00
Martin Gräßlin
d1076fc5b9 Merge branch 'Plasma/5.8' 2016-11-03 08:51:49 +01:00
David Edmundson
254690e899 Correctly set i18n suffix in mousemark spinbox.
Summary:
QSpinBox can't handle plural suffixes. Something previously done by
KIntSpinBox.

Using setSuffix(ki18np("pixel", "pixels")).toString() does nothing, as
at the time of conversion we don't know which one to use.

This patch uses KPluralHandlingSpinBox and correct ki18np.

Note, "new" dependency was already linked implicitly in other kwin, but
we need to add it for this KCM.

Test Plan:
Opened KCM (in English) set counter to 1 pixel and 2 pixels.
No longer had a big warning. Also appropriate number of s's appeared.

Reviewers: #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3222
2016-11-02 13:07:39 +00:00
Jonathan Riddell
241d8bfa27 Update version number for 5.8.3
GIT_SILENT
2016-11-01 11:35:59 +00:00
Takahiro Hashimoto
052fa2e4ee [plugins/qpa] support use of modularized qtplatformsupport from Qt 5.8
REVIEW: 129268
2016-10-28 21:12:48 +09:00
Jonathan Riddell
b9efeb6c28 Update version number for 5.8.2
GIT_SILENT
2016-10-18 11:56:18 +01:00
Martin Gräßlin
3e8bd70ff4 Merge branch 'Plasma/5.8' 2016-10-17 16:13:49 +02: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
Jonathan Riddell
1c3cc6239e Update version number for 5.8.1
GIT_SILENT
2016-10-11 10:43:31 +01:00
Jonathan Riddell
78143b0cf9 Update version number for 5.8.0
GIT_SILENT
2016-09-29 11:00:41 +01:00
Jonathan Riddell
5216afadc8 Update version number for 5.8.90
GIT_SILENT
2016-09-15 13:16:39 +01:00
Jonathan Riddell
1cb2bd99a0 Update version number for 5.7.95
GIT_SILENT
2016-09-15 10:14:54 +01:00
Martin Gräßlin
cd053bf864 Require frameworks 5.26 2016-09-14 15:08:44 +02:00
Martin Gräßlin
a98a1b1376 Support compose key in xkbcommon integration
Summary:
The Xkb class now creates a compose key table and a state object and
feeds all key presses through the compose state machine.

Xkb now tracks the latest keysym which is provided through new method
currentKeysym. This is now used when creating a QKeyEvent instead of
passing the key code to the xkb state. With that the keysym can also
be updated through the compose state system.

This only affects KWin internal usage where text is composed, e.g. the
present windows effect filter. Wayland clients do not gain compose key
support, though.

Minimum xkbcommon version raised to 0.5 as compose key support is new
in that version.

Test Plan: Enabled compose key support in keymap and verified through DebugConsole

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2622
2016-08-30 08:06:54 +02:00