Commit graph

3 commits

Author SHA1 Message Date
Yuri Chornoivan
bf58da3e9a Fix minor EBN issues 2018-08-29 21:02:16 +03:00
Martin Flöser
ea5e701164 [x11] Fix interactive point selection
Summary:
The support for interactive point selection was missing. This results in
the ColorPicker dbus API always returning an error on X11. We either need
to disable the ColorPicker on X11 or add support for this functionality.

As the X11 platform basically supports selecting a point in the
interactive window selection it makes more sense to add this missing
method in the platform than to disable support of color picker effect.

BUG: 387720
FIXED-IN: 5.12.1

Test Plan:
Run KWin/X11 on Xephyr and was able to pick a color and
kill a window

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10302
2018-02-05 21:21:27 +01:00
Martin Gräßlin
7b464cf284 Support interactive window selection through the Platform
Summary:
A new virtual method is added to Platform:
startInteractiveWindowSelection

The interactive window selection enters a mode where the user can select
a window through the pointer or keyboard device. The cursor is turned
into a crosshair cursor, unless another cursor name is provided (e.g.
pirate for kill window).

Once a window is selected the provided callback method is invoked with
the selected Toplevel as argument. In case the user cancelled the
selection a nullptr argument is passed in.

Currently it's only implemented by the X11 standalone platform using the
logic from KillWindow. Just instead of killing the window the callback
is invoked.

KillWindow loses the X11 implementation and interacts with the new
functionality in Platform by providing a lambda function for the
killing.

Test Plan: Killing of X11 windows is still possible

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3363
2016-11-17 08:08:56 +01:00