Commit Graph

116 Commits (96124c1643f565f2c67421f4cffa7c4c728a4d7f)

Author SHA1 Message Date
Marco Martin 1f9fa64a49 preliminar support for task geometries in wayland
make the minimize effect work by reading taskGeometry
from plasmawindowmanagement and returning as iconGeometry()
there is one task geometry per panel window, iconGeometry()
will return the geometry associated to the nearest panel
from the window

REVIEW:125873
2015-11-05 11:36:40 +01:00
Martin Gräßlin a23a9d38f9 Make it possible to end move/resize through mouse button release
Properly handle the mouse press/release events in InputRedirection
while we move windows. If it's the last mouse release event we end
the move resize of the window. For that we reuse the code written
in Client.
2015-10-28 10:43:49 +01:00
Martin Gräßlin f1215e44d4 Move implementation of (shrow|grow)(Horizontal|Vertical) to AbstractClient
Methods are no longer virtual. The only x11 specific usage in these
methods (resizeInc) is replaced by a virtual method. Default resize
increments is QSize(1,1) for AbstractClient.
2015-10-26 15:49:03 +01:00
Martin Gräßlin b19da3cb14 Move implementation of Client::packTo to AbstractClient
Method no longer virtual and only implemented in AbstractClient.
The implementaton works in a generic way nowadyas.

Added an autotest for the basic packTo behavior for packing against
a screen border. Packing towards other clients still needs adjustments
in the Placement code.
2015-10-26 11:30:34 +01:00
Martin Gräßlin 5d2251875f Move keyPressEvent(uint) to AbstractClient
The variant with additional timestamp is still in Client.
2015-10-26 09:21:36 +01:00
Martin Gräßlin f5848d9405 Move implementation of updateMoveResize to AbstractClient
No longer virtual.
2015-10-26 09:21:36 +01:00
Martin Gräßlin f4b02d5a8c Move handleMoveResize to AbstractClient
Sync related code is split out into dedicated virtual methods so that
Client can provide the X11 specific implementation. General handling,
though is completely in AbstractClient.
2015-10-26 09:21:36 +01:00
Martin Gräßlin dcff41ab40 Move checkQuickTilingMaximizationZones to AbstractClient
Implementation is moved to abstract_client.cpp as so far events.cpp
does not have any code from AbstractClient.

This includes moving the electricMaximizingDelay from Client to
AbstractClient.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 7e23860957 Move performMoveResize to AbstractClient
As there is X11 specific code, this is moved into a virtual
doPerformMoveResize method.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 43e4071975 Provide positionGeometryTip() as virtual method in AbstractClient
The implementation of positionGeometryTip is X specific, we need to
figure out whether that one makes sense for Wayland. Given that, let's
have it virtual to ease the transition of code which calls it.
2015-10-26 09:21:36 +01:00
Martin Gräßlin c83f041005 Move startMoveResize() to AbstractClient
The implementation calls a virtual doStartMoveResize() which allows
Client to do it's X11 specific tasks (creating moveResizeWindow, grabbing
input).

The base implementation is no longer virtual.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 9e323227a1 Move (start|stop)DelayedMoveResize to AbstractClient
Also requires to add startMoveResized() as a virtual method. Not
yet implemented in AbstractClient.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 95a99d337a Move s_haveResizeEffect from Client to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin ba53407b52 Move finishMoveResize(bool) to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin 1c40e809ea Provide leaveMoveResize() as virtual method in AbstractClient
The non X11 specific code is split out into a base implementation
which is called from the Client.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 88e097ec16 Move signals clientFooUserMovedResized to AbstractClient
This also changes the argument to carry the sending AbstractClient
instead of Client.
2015-10-26 09:21:36 +01:00
Martin Gräßlin dc04cdef64 Move moveResizeStartScreen from Client to AbstractClient
Initialized in updateInitialMoveResizeGeometry().
2015-10-26 09:21:36 +01:00
Martin Gräßlin dcb5e29316 Move updateCursor() functionality to AbstractClient
Includes moving the m_cursor and Qt::CursorShape cursor() method to
AbstractClient. In addition AbstractClient now emits a signal whenever
the shape changes allowing Client to react on it (update the low level
cursor) and also hopefully the Wayland Backends to react to it, so that
we have the cursor.
2015-10-26 09:21:36 +01:00
Martin Gräßlin b8e68307bb Move buttonDown from Client to AbstractClient
Bundled together with other moveResize functionality. We might need
to investigate whether this variable is needed at all.
2015-10-26 09:21:36 +01:00
Martin Gräßlin 605acaf60e Move checkUnrestrictedMoveResize() from Client to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin c9dbd94812 Move properties move and resize from Client to AbstractClient
Includes the public methods isMove() and isResize() and the signal
moveResizedChanged().
2015-10-26 09:21:36 +01:00
Martin Gräßlin 8a3be2bacd Move the Position mode from Client to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin c3f14521c1 Move moveResizeGeom to AbstractClient
Biggest impact on Client::handleMoveResize which directly manipulated
the variable in various parts. I tried to keep the impact low.
2015-10-26 09:21:36 +01:00
Martin Gräßlin b4fc4d7235 Move initialMoveResizeGeometry to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin 84c7575cbf Move (inverted)MoveOffset to AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin 3514b4d691 Track whehter moveResize is unrestricted in AbstractClient 2015-10-26 09:21:36 +01:00
Martin Gräßlin b5e8e3511e Track whether Client is in moveResizeMode in AbstractClient
Variable moveResizeMode replaced by protected methods isMoveResize()
and setMoveResize().
2015-10-26 09:21:36 +01:00
Martin Gräßlin 8cdfb0e88f Merge back implementation of Client::move and ShellClient::move
Implementation goes to AbstractClient, method is no longer virtual.
The X11 specific code is moved to a new virtual protected doMove
method implemented in Client.
2015-10-15 15:29:09 +02:00
Martin Gräßlin c578720615 Add virtual AbstractClient::updateTabGroupStates(TabGroup::States)
Method added so that we can call into TabGroup::updateStates from code
in AbstractClient. Default implementation does nothing, implementation
in Client performs the actuall call.

As a first case added to Client::move in order to be able to move the
implementation to AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin d7b4d8fe82 Move functionality for geom_before_block to AbstractClient
Semantically it belongs together with geometry update blocking which
is already in AbstractClient.
2015-10-15 15:29:09 +02:00
Martin Gräßlin a186e407bf Move handling around deco_rect_before_block to AbstractClient
The usage was always to trigger repaints on the old and the new
visibleRect. And store the new visibleRect as the future old one.

This is now encapsulated in a dedicated method called
addRepaintDuringGeometryUpdates().
2015-10-15 15:29:09 +02:00
Martin Gräßlin 6049b9ff3c Move implementation of sendToScreen from Client to AbstractClient
Method is no longer virtual, stub in ShellClient removed.
2015-10-14 16:38:17 +02:00
Martin Gräßlin 996c828da3 [autotest/wayland] Add a test for quick tiling Wayland clients
Base test verifies the quick tile positions. No maximization or direct
state changes tested yet.

Required to have Toplevel and AbstractClient exported. Otherwise we
cannot use the SignalSpy.
2015-10-14 09:58:16 +02:00
Martin Gräßlin 9f91431e8c Move quick tiling from Client to AbstractClient
In order to make it possible to quick tile also ShellClients.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 9f2b4c7d14 Introduce a virtual AbstractClient::updateQuickTileMode(QuickTileMode)
New method is used to modify the quick tile mode state directly.
Preparation step for moving the quick tile handling to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 15f5886426 Add a pure virtual AbstractClient::setGeometryRestore(const QRect &) 2015-10-14 08:36:29 +02:00
Martin Gräßlin 9ef42ae3c7 Move blocking geometry updates functionality to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin 646eeb8bbb Provide isDecorated() as virtual method on AbstractClient
Default implementation returns false.
2015-10-14 08:36:29 +02:00
Martin Gräßlin ec6c778df7 Move implementation of checkWorkspacePosition to AbstractClient
No longer a virtual method, the implementation of Client is turned into
AbstractClient. The stub removed from ShellClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 696cdb9e39 Add setGeometry to AbstractClient as pure virtual method
In Client existing method is marked as override, in ShellClient a new
override is added which delegates to requestGeometry. Existing method
is renamed to doSetGeometry and all internal calls delegat to it.
Needs better merging with the implementation of Client.
2015-10-14 08:36:29 +02:00
Martin Gräßlin eacaf25acf Improve sharing of maximize between Client and ShellClient
The changeMaximize method is added as a pure virtual protected method
to AbstractClient. This replaces the previous pure virtual maximize
method. Which is now directly implemented in AbstractClient (reusing
the implementation previously in Client).
2015-10-14 08:36:29 +02:00
Martin Gräßlin 60342d44e3 Move adjustedSize from Client to AbstractClient 2015-10-14 08:36:29 +02:00
Martin Gräßlin 7c49b1ca42 Add sizeForClientSize as virtual method to AbstractClient
Base implementation returns the passed in size.

Required for moving adjustedSize to AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 37fc20d3c0 Move enum Sizemode from Client to AbstractClient
Required to add e.g. sizeForClientSize and adjustedSize to
AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin acb3a14200 Add border(Left|Top|Right|Bottom)() const as virtual methods in AbstractClient
At some future point we will also need it in ShellClient and it allows us
to better share geometry related implementations.

Base implementation returns 0, that is no border.
2015-10-14 08:36:29 +02:00
Martin Gräßlin ee47ce613d Provide quickTileMode() as virtual method in AbstractClient
Base implementation always returns QuickTileNone. Implementation in
Client overrides. Long term solution: provide functionality directly
in AbstractClient.
2015-10-14 08:36:29 +02:00
Martin Gräßlin 78e9a56cd1 Move checkOffscreenPosition from Client to AbstractClient 2015-10-12 10:50:20 +02:00
Martin Gräßlin 53b87dbbd9 Move (is|set)ElectricBorderMaximizing from Client to AbstractClient 2015-10-12 10:26:00 +02:00
Martin Gräßlin 226a099366 Move electricBorderMaximizeGeometry from Client to AbstractClient
As it's not used outside of Client the method is turned from public
to protected.
2015-10-12 10:24:49 +02:00
Martin Gräßlin 32fbbc90bc Make geometryRestore() pure virtual in AbstractClient
Provides an implementation in ShellClient and method in Client gets
marked as override.
2015-10-12 10:23:06 +02:00