Commit graph

5 commits

Author SHA1 Message Date
Martin Gräßlin
dd3c6d6cc2 Implement show on screen edge for Wayland
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
2016-10-05 07:51:47 +02:00
Thomas Lübking
0508528461 # This is a combination of 2 commits.
# 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
2015-05-15 23:55:26 +02:00
Martin Gräßlin
6826b9eb94 [autotests] Adjust to changes regarding AbstractClient
We need a Mock for AbstractClient and our mock Client needs to
inherit from it.
2015-05-08 12:43:47 +02:00
Martin Gräßlin
883445d5e8 Add an auto-test for ScreenEdges
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
2014-09-26 14:01:44 +02:00
Martin Gräßlin
4eadc9daef [auto-tests] Add an initial test for Screens
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.
2014-09-17 10:29:03 +02:00