Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.
With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
To support this feature the DesktopModel is turned into a tree model with
the desktops on the root level and the Client's at the next level.
In the view a VisualDataModel is used which kind of supports a tree model
by setting the root index. A list view is added underneath all the
desktops showing the icons of the windows on the desktop one switches to.
BUG: 306187
FIXED-IN: 4.11
REVIEW: 108445
Escaping is performed in the model instead of the UI as each of the QML
files needed to be fixed and it is likeley that the issue would come up
again. In the model it's hopefully fixed for good.
BUG: 309960
FIXED-IN: 4.9.4
REVIEW: 107431
If the start Client is not part of the focus chain the call to
nextClientFocusChain() cannot return the Client again. So the loop break
condition is never reached and as the focus chain is not empty the call
always returns a not null Client which means KWin is caught in an endless
loop.
This change checks that the starting Client is in the focus chain and if
not the first Client of the focus chain is used.
BUG: 306260
BUG: 306275
FIXED-IN: 4.9.2
So far the first Client to be shown in the list (that is the
currently active window) was inserted as the last client into
the list by prepending it to the list.
This meant that if another Client actually blocks the inclusion
of the currently selected Client (e.g. only one window per app)
the currently active Client never got included in this list.
This change ensures that the recently used model switching has
the starting Client as the first Client in the list and also
simplifies the code.
Stacking order switching mode is not adjusted as it seems rather
broken, like the comment already says.
BUG: 304950
FIXED-IN: 4.9.1
REVIEW: 106139
The recently used mode of TabBox uses the active window as the entrance
into the focus chain. If there is no active window it does not find any
Clients. To solve this issue the ClientModel now uses the first entry
of the focus chain in case there is no active window.
BUG: 305449
FIXED-IN: 4.9.1
REVIEW: 106088
Since the QML port the LayoutMode had been hardcoded to vertical
layout making it a completely useless code-path.
MinWidth/Height are nowadays completely controlled by the QML
theme. They were not read anywhere except in the kcm, but there
not even bound to a ui element.
The selectedItemLayoutName is also not used anymore with the
new themes.
The method was missing a check whether the weak pointers in the
internal list got deleted. This could in very unlikely cases
lead to a crash.
In order to verify that adding the null pointer check fixes the
crash a unit test is added to simulate the situation of a
pointer being deleted. This required to add a mock a few
classes of TabBox. A MockTabBoxHandler and MockTabBoxClient are
added implementing the specific interfaces. The DeclarativeView
is completely mocked to make the linker happy. Including the
actual implementation is not possible as it pulls in half of
KWin core.
BUG: 303840
FIXED-IN: 4.9.0
REVIEW: 105645
Client holds a SharedPointer to the TabBoxClient and only
provides access to a WeakPointer which is passed to TabBox.
ClientModel is adjusted to hold a list of WeakPointers instead
of the direct pointers.
This fixes the following reproducable crash:
1. Configure both primary and secondary TabBox with different
layouts
2. Use primary TabBox
3. Close a window, best the one which used to be active
4. Use secondary TabBox
-> Crash
The reason is that the ClientModel still contains the pointer
to the deleted TabBoxClient in step 3 and while creating the
layout access to the TabBoxClient is needed to get the Client's
icon.
By using the weak pointer it can be ensured that we don't try
to dereference the deleted pointer and prevent the crash.
CCBUG: 290482
CCBUG: 285747
CCBUG: 237345
REVIEW: 105000
If there are no windows for Alt+Tab the Show Desktop entry
is shown. This works better with both layouts and effects.
Before this change effects were not activated at all but
a fallback to the layouts was used. Concerning the layouts
some looked rather bad. E.g. Thumbnails did not show a
thumbnail but a legacy text had been shown.
When a window gets added to the empty list, the show desktop
window is removed and consequently when the last window goes
away the show desktop entry is added again.
There is a not considered corner case: if there is no desktop
window, the show desktop functionality is not available and
the behavior is unfortunately undefined. It is a corner case
as we can expect that there is always a desktop window when
using KWin. E.g. there is either Plasma Desktop or Netbook
and on PA there is always at least one window.
BUG: 260938
FIXED-IN: 4.9.0
REVIEW: 104379
This is useful in combination of non-modal TabBox through DBus and
window-strip layout. With DBus the non-modal TabBox can be started
and selecting any item on the strip will end TabBox again.
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.
While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.
This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.
When compositing is disabled an icon is rendered instead of the
Thumbnail.
One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.
REVIEW: 103039
All the default layouts (informative, compact, text, small and big icons)
are rewritten in QML and replace the ListView used before. The old code
is still around for the desktop switching modes which are not yet ported.
Next steps include to update the configuration module to not show now
obsoleted settings as well as providing a better way to choose the layout.
REVIEW: 102948
* Models and Delegates for Clients and Desktops
* Horizontal, vertical and tabular layout
* Layout of one item can be configured by an XML definition
* A desktop item can include a client list
* An optional second list view showing only the selected item
* A new KCM "kwintabbox"
* An alternative TabBox with independent settings and keybindings
* Optional Highlight Windows effect integration
* List scrolls instead of removing items
* Scroll wheel support
* Cursor key support
* Middle click on item closes window
BUG: 195745
BUG: 197187
BUG: 201103
FEATURE: 118184
FEATURE: 156723
FEATURE: 177441
FEATURE: 182897
FEATURE: 193882
GUI:
svn path=/trunk/KDE/kdebase/workspace/; revision=1022861