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
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
# 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
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
This is a very interesting auto test as Screens uses both Workspace
and Client. Thus it operates in the "impossible to mock" area.
The solution is to provide mock includes in autotests and ensure that
when building the auto-test the mock header includes will be picked
first. There is now a mock class for Workspace and Client providing
just the API pieces used inside Screens.
As Screens is abstract and we cannot properly interact with
QDesktopWidget there is also a MockScreens class inheriting from Screens
and mocking the required functionality (by just operating on a list of
QRects).
The auto-test itself is only performing checks on the abstract class.
The mock class is indirectly tested by Screens calling into the virtual
methods. The test case is not yet complete, but looking quite good
already.