The new class FocusChain manages two different kind of focus chains.
First of all there is a most recently used focus chain which is primarily
used for TabBox.
Then there is one focus chain per virtual desktop. These chains are used
to determine which Client needs to be activated when e.g. switching to a
virtual desktop.
The individual chains are implemented as a simple QList of Client* with
the most recently used Client as the last element. That way one can see
it as a LIFO like structure.
The desktop focus chains are internally represented as a hash with the id
of the virtual desktop as the key and a list as described as the value.
FocusChain is a singleton which provides some methods to manipulate the
chains and to get a specific Client for a task (e.g. TabBox).
While splitting out the code some unused code inside TabBox got removed
as well as some activities related code (windows cannot be moved while
switching activities).
REVIEW: 107494
but drop screenedges below the supportWindow instead
that's why it exists, that's deterministic, that's faster
includes adaption to new screenedge and xcb invocation (compared to 4.10)
BUG: 314625
FIXED-IN: 4.10.1
REVIEW: 108867
- don't cast Window's to pointers for no apparent reason
bug introduced with ac0f8bfb24403168199027a77bba0107bc6d42e1
- no stupid java style iterators, we've stl everywhere
- postfix in a for loop is a bug. period. ;-)
BUG: 313145
REVIEW: 108864
FIXE-IN: 4.10.1
In fact it already used to be a Singleton as there is just one object
hold by the Singleton Workspace. So let's make it a proper Singleton
following our kind of standard approach of having a ::create factory
method called from Workspace ctor and a ::self to get to the singleton
instance.
This rewrite is mostly motivated by the need to handle multi screen
setups correctly. That is have edges per screen and not for the combined
geometry. Also porting from XLib to XCB has been a motivation for the
rewrite.
The design of the new ScreenEdge handling is described in the
documentation of ScreenEdges in screenedge.h.
In addition the following changes have been performed:
* move configuration from Options to ScreenEdge
* add screen edge information to Workspace::supportInformation (obviously
replaces what had been read from Options)
* have Workspace hold a pointer to ScreenEdges instead of an object
* forward declaration of ScreenEdges in workspaces.h, this explains the
seemingly unrelated changes of just another include in some files
BUG: 290887
FIXED-IN: 4.11
The ownership for virtual desktops is moved from Workspace into a new
VirtualDesktopManager. The manager is responsible for providing the count
of virtual desktops and keeping track of the currently used virtual
desktop.
All methods related to moving between desktops are also moved from
Workspace to the new manager, though all methods related to Clients on
Virtual Desktops remain in Workspace for the time being. This is to have
the new manager as independent from KWin core as possible.
An rather important change for the handling of virtual desktops is that
the count and the id of a desktop is now an unsinged integer instead of
an integer. The reason for that is that we cannot have a negative count
of desktops as well as it is not possible to be on a desktop with a
negative identifier.
In that regard it is important to remember that a Client can be on a
desktop with a negative identifier. The special value for a Client being
on all desktops is handled by using -1 as a desktop. For the time being
this is not adjusted but instead of comparing the virtual desktop ids one
should prefer to use the convenient methods like isOnDesktop and
isOnAllDesktops. This would allow in future to internally change the
representation for on all desktops.
It is not used anywhere inside KWin at all and the DBus method is not
used anywhere inside KDE's repositories (according to lxr). Because of
that marked as deprecated and going to die with Qt 5.
REVIEW: 107406
All Workspace functions which were implemented in the file composite.cpp
were moved to an own class Compositor. The header entries were moved as well.
All functions calls are updated.
The change to have stacking order containing
Toplevel inestead of Clients (431aad6d6994695e72697fcc3299ec2cb6f0684e)
introduced possible crashers as recognized in:
http://git.reviewboard.kde.org/r/104519/#review12714
This change fixes these issues by adding missing
null pointer checks after casting to Client.
BUG: 298669
FIXED-IN: 4.9.0
REVIEW: 104714
Workspace::addDeleted swaps the Client with the Deleted in the
stacking order. For Unmanaged windows the Deleted is appended
to the stacking order which is the same layer.
When the deleted is closed the window is removed from the stacking
order.
The result is that a deleted window is no longer raised above all
other clients.
REVIEW: 104519
BUG: 158262
FIXED-IN: 4.9.0
The common usage of stacking order is to loop through
the list and find a specific Client. All these usages
still need to find a Client. For that the loops are
adjusted to first cast the Toplevel into a Client and
continue if the current item is no Client.
At the moment all entries in the stacking order should
still be Clients as the Deleted are not yet added.
This can be used by (autohiding) panels to get the panel above other keepAbove windows
Since the activation still impact the stacking order, the panel should still use
QWidget::raise() or eventually KWindowSystem::raiseWindow(WId win) to (forcefully) get the panel on top.
NOTICE: latter is actually a call for tools like pagers and taskbars, don't abuse it but
preferably use QWidget::raise() instead. Unless the user doesn't type into the keepAbove window while
activating the panel at the same time, this *should* be sufficient.
BUG: 203931
REVIEW: 104279
This input-only window is used to capture events above the
client window and preventing them from reaching the client.
It is currently used to enlarge the borders by an invisible
amount, using the ExtendedBorderRegion provided by the
decoration.
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.
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.
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.
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.
REVIEW: 101485
Ensure electric borders are above effect input windows after blocking stacking order updates.
CCBUG: 200235
svn path=/trunk/KDE/kdebase/workspace/; revision=1179523
in case the new stacking order is needed before kwin gets the matching event,
due to X being asynchronous.
BUG: 171033
svn path=/trunk/KDE/kdebase/workspace/; revision=866605