ScreenEdge is changed to emit a signal whenever a screen edge
got activated without an action or effect taking care of it.
A Script can reserve one to many callbacks for an edge and the
callback get's triggered whenever the signal is emitted. On
deconstruction of the Script the edge is unreserved again.
FEATURE: 299275
FIXED-IN: 4.9.0
REVIEW: 104904
Since the method destroy() was called only from one location in the code
followed by update(), the funtionality has been moved to the method update()
which now takes an boolean argument 'force'. This argument is false by default
and set to true only at that location where destroy() was called formerly.
The code was updated to use a QVector for the screen edge windows instead of
an ordinary Window array. The getter method windows() was updated to return
now this QVector.
In the method propagateClients() in layers.cpp the newWindowStack QVector is
filled by iteration through the screen edge windows and only adding Windows that
are not None.
Since the functions were moved from Workspace to its own class ScreenEdge
and the functionality was formerly called ElectricWindows, the functions still
had the old names. They are now consistenly renamed without redundand naming.
The function calls were updated as well in all classes where ScreenEdge is used.
The initialization was done in class Workspace before but is now
moved to class ScreenEdge in its own init() method. Is is called from
Workspace at the same position where the initialization took place before.
Since the functionality of screen edge handling was moved to its own class,
the screen edge windows are now provided by the getter method screenEdgeWindows().
The new getter method screenEdgeWindows() returns a reference to a QVector,
which includes the screen edge windows.
The Workspace method propagateClients() implemented in layers.cpp needs these
screen edge windows to restack the windows. The code was also modified to use
QVector instead of a Window array.
A new getter method screenEdgeWindows() is provided by class ScreenEdge
since the screen edge windows are needed in class Workspace in the function
propagateClients() which is implemented in layers.cpp
This commit change the screen edge function calls to be called in the
new class ScreenEdge. The old methods are still in Workspace and will
be removed in a further commit.
This initial commit introduces a two new files screenedge.h and screenedge.cpp which cover a new
class ScreenEdge. The code for screen edge handling was copied from Workspace to this class.
Workspace had to be extended by a getter for movingWindow. CMakeList was updated to build the
new class.