Summary:
Screenedges only allows to switch desktop while moving window, not
while resizing. There was a special branch which only checked this for
X11 windows but not for Wayland windows.
This change removes a no longer needed cast from AbstractClient to Client
so that the check whether a window is getting resized works for both
X11 and Wayland clients. The cast was introduced in a time when
AbstractClient did not yet support the isResize method.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6264
Summary:
There was a regression introduced in ScreenEdges when introducing the
activatesForPointer method. It considered the switch desktop on edge,
but not the special case of switch desktop when moving windows. Due to
that the edges did not activate when moving the window.
This change addresses the regression and extends the autotest to ensure
it's properly covered.
BUG: 380440
FIXED-IN: 5.10.3
Test Plan: Manual testing and extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6257
Summary:
This change ensures that the blocking condition of screen edges is also
honored for touch screen swipe gestures.
Test Plan: Only the added test case
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5403
Summary:
On X11 the edges reserved only for pointer started to show the approach
geometry. This problem is addressed by this change.
Touch screen events do not go through this method, neither is it used on
Wayland.
Test Plan: Tested on X11, problem fixed
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5421
Summary:
This is implemented through QActions following the general approach
inside KWin and not the older approach used by ScreenEdges for pointer
callback activation.
Test Plan: Extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5263
Summary:
The new touch gestures activated for the same actions as configured for
mouse pointer actions. This has disadvantages as the only configured
default screen edge action cannot be triggered (corner) on touch. On the
other hand setting a default touch gesture would be rather annoying with
pointer as a default.
So overall it makes sense to split the actions and have dedicated pointer
and dedicated touch actions.
This change introduces the first part of it and splits the handling in
general. We now have:
Activates for pointer and touch:
* client (auto-hiding panels)
Activates for pointer only:
* the configured action
* virtual desktop switching
* callbacks
Activates for touch only:
* the new touch action
The touch actions are implemented similar to the pointer actions which
slight improvements in the code which will be backported to the pointer
actions.
Introducing callbacks will be the next step. I plan to do it a little bit
different by using QActions as that's what KWin internally uses for
everything except screen edges.
Test Plan: Manual testing and improved auto tests
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5252
Summary:
Each Edge creates a SwipeGesture for touch activation. The swipe needs to
be a single finger starting from the edge into the screen for at least
20 %. The SwipeGesture and GestureRecognizer is extended to support the
use cases of the touch screen edge swipe.
New features supported by the gesture system are:
* minimum and maximum position
* a minimum delta for the swipe
* progress signal based on the minimum delta
* starting a swipe with a start point
The Edge has the progress signal connected to its approach signal, thus
visual feedback is provided through the screen edge effect.
The screen edge system supports touch only for the edges (corners are
too difficult to activate on touch screens). At the moment the following
features are supported:
* screen edge show/raise of windows (e.g. auto hidden panels)
* trigger the configured action
* trigger the configured callback function (e.g. script)
In future it might make sense to add a touch specific configuration
action to support different actions for screen edges activated by mouse
and touch.
BUG: 370323
Test Plan:
configured a screen edge and triggered through touch,
added an auto-hiding panel and triggered through touch
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5106
Summary:
auto hidden windows were shown again when their geometry
changed, this was done for being as easy as possible as
the unhide zone changed, but the behavior looked very
annoying as autohide panels with an self resize taskbar
would unhide themselves every time any window gets open
or closed.
This makes the edge keep track of
windows that can resize/move themselves while auto hidden
Test Plan:
a self-resizing autohidden panel with a taskbar in it doesn't auto unhide
anymore when a window is opened or closed.
the unhide area gets properly updated
Reviewers: graesslin, #plasma
Reviewed By: graesslin, #plasma
Subscribers: luebking, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D4718
Summary:
This change ports ScreenEdges to operate on AbstractClient instead of
Client. For this AbstractClient gained a new pure virtual method
showOnScreenEdge which is also implemented in ShellClient.
In ShellClient the functionality is bound for the case windows can
cover a panel. If triggered the panel gets raised again.
The auto hiding panel, though, is not yet implemented. For that the
protocol needs to be adjusted to give a hint to the compositor when to
hide and hint back to the panel when it was shown. This needs a change
in KWayland and thus is not 5.8 material.
Test Plan: See added test case
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2793
Summary:
Now that we have a dedicated dbus call to show the application launcher
we can also expose it through the screenedges.
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D2394
Allows to toggle Activity Manager and bring up KRunner by hitting the configured screen edge.
BUG: 358627
BUG: 245979
Differential Revision: https://phabricator.kde.org/D1105
Removes a diversion between X11 and Wayland. The base class Platform
creates an instance of class Edge with plugin implementations being
able to create a different type.
The X11StandalonePlugin does that and creates a WindowBasedEdge. For
this the implementation of WindowBasedEdge is moved from screenedges
into the plugin.
Unfortunately an ifdef is needed to make the screenedge test still
work as expected. This should be improved in future, e.g. have a good
way to load the platform plugin from the tests.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1419
So far the area based edges connected directly to global pointer pos
changed in InputRedirection. This didn't allow proper checking whether
the edge was triggered (e.g. missing timestamp).
This change merges the functionality into the new input filter mechanism.
There is now a dedicated input filter for screen edges, installed after
lock screen and before effects. It always passes events on, but also passes
all events through ScreenEdges to handle the activation. As it's installed
after the lock screen filter we don't need to check for screen locked any
more.
The code is now similar strucutured to the existing X11 based variants
and maybe will allow to also merge the X11 variant with the new one.
We need to update the pointer position, also if the screen is locked.
Otherwise the pointer doesn't move on the locked screen with libinput.
In addition we need to use the m_globalPointer for finding the correct
lock screen window as updatePointerWindow also does sanity checking on
the coordinates.
Also we need to introduce security checks where we use the signal.
REVIEW: 126103
It was broken on so many ways, it's unbelievable:
* action was read but did nothing
* config was saved into a different file than read from
REVIEW: 125701
CCBUG: 331841
Removes the ElectricAction for ShowDashboard and the relevant code
in screenedges and the KCM.
Also a leftover in the glide effect.
REVIEW: 125700
BUG: 353928
Add action type to screen edge show to allow raise/lower as well as
autohide
Add an action type to screen edge show to allow raise/lower as well as
autohide. This uses the same atom, using a mask to separate type and
location.
The logic for handling geometry changes is moved from the screenedge to
the client so that we can handle both types without screenedge needing
to know what the raise is for.
REVIEW: 124272
commit c6bd68d78a2e00ce094a4087c106aaf4067f9f57 fixed a bug
that allowed early invocation when pushback was forced down.
However, it also turned activation and re-activation time
additive again (ie. invocation could only happen after
r+a ms instead of after r ms)
see also REVIEW 124888
REVIEW: 125143
regardless of whether the pushback is forced down or the user
has deactivated it or whatever. The edge is waiting from previous
activation and we need to prevent immediate reactivation since that
may cause duplicate action and unwanted state toggles
BUG: 351627
CCBUG: 351869
FIXED-IN: 5.4.1
REVIEW: 124888
this probably makes sense since it won't
have major impact on the workspace like
switching the VD or entering
presentwindows/desktopgrid would
REVIEW: 123904
# The first commit's message is:
do not switch desktop on resizing windows
REVIEW: 123599
# The 2nd commit message will be skipped:
# fix screenedge flipping merge
If two or more screens overlap (partially or fully)
we must not create double edges since kwin would
trigger both - since they've the same actions bound
(for sure) the action will called twice (so either
eg. toggle or skip one VD etc.)
BUG: 338381
REVIEW: 120060
The new test does not cover ScreenEdges completely, so far the
following areas are handled:
* creating of the edges
* reserving of edges
* trigger callback
* cursor pushback
* blocking of edges for fullscreen active clients
until the event cycle finished - xcb_flush nor
even XSync around the cursor setting does not
help and the pushback operates on a false position,
purging the VD switch warp
BUG: 338593
REVIEW: 119960
if there's no desktop toLeft/Right above/below it's wrong
to warp the cursor, branch opens on corner edges
CCBUG: 333341
Forward port of eea4bb81105f2c289831cf1f682c3927a24fd831 from kde-workspace
A new AreaBasedEdge is introduced which supports the Edge functionality
by just connecting to the globalPointerChanged signal of
InputRedirection.
The AreaBasedEdges are used if KWin's operation mode is not X11 only.
This unfortunately required to change the datatype of the list of edges
in ScreenEdges. It used to be specific on the inheriting class.
This provides a new protocol intended to be used by auto-hiding panels
to make use of the centralized screen edges. To use it a Client can
set an X11 property of type _KDE_NET_WM_SCREEN_EDGE_SHOW to KWin.
As value it takes:
* 0: top edge
* 1: right edge
* 2: bottom edge
* 3: left edge
KWin will hide the Client (hide because unmap or minimize would break
it) and create an Edge. If that Edge gets triggered the Client is shown
again and the property gets deleted. If the Client doesn't border the
specified screen edge the Client gets shown immediately so that we
never end in a situation that we cannot unhide the auto-hidden panel
again. The exact process is described in the documentation of
ScreenEdges. The Client can request to be shown again by deleting the
property.
If KWin gets restarted the state is read from the property and it is
tried to create the edge as described.
As this is a KWin specific extension we need to discuss what it means
for Clients using this feature with other WMs: it does nothing. As
the Client gets hidden by KWin and not by the Client, it just doesn't
get hidden if the WM doesn't provide the feature. In case of an
auto-hiding panel this seems like a good solution given that we don't
want to hide it if we cannot unhide it. Of course there's the option
for the Client to provide that feature itself and if that's wanted we
would need to announce the feature in the _NET_SUPPORTED atom. At the
moment that doesn't sound like being needed as Plasma doesn't want to
provide an own implementation.
The implementation comes with a small test application showing how
the feature is intended to be used.
REVIEW: 115910
Problem description: if a window decoration is in the screenedge
(not really unlikely for maximized windows) we either did not get
mouse events to the decoration or the screenedge window. E.g. the
enter event didn't reach the approach window which means it doesn't
get unmapped and thus the motion events in that area are not passed
to the decoration below. The same happened for the screenedge window,
the enter event was just not delivered if there is a window decoration
in the edge.
To solve this problem we listen for motion events in the approach and
the edge window and pass them from the event filter to the screen edges.
If one of our windows contains that the position of the motion event
we trigger the edge just in the same way as we do with the enter event.
Greetings from the "wtf, how could that have ever worked" department.
This fixes the screenedge activation on Qt 5. The last trigger time is
only set after an activation so before activation it is invalid thus the
comparison to any value doesn't make sense.
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
The logics relied on a static timout to arm the timer:
when last successfull activation had been longer ago than 250ms.
We now cap the configured reactivation timeout at min 250m
guessing that this was somehow supposed as well by this.
BUG: 322057
FIXED-IN: 4.11
REVIEW: 111549