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
Flicking has to stop at the bounds in the window switcher
layouts. It's not natural on the desktop that they are
flickable in the first place.
Window Strip is unchanged as this layout is intended to be used
on touch and flickable user experiences.
REVIEW: 105001
cppcheck complained about that piece of code and it was not
really good. A TabBoxClient belongs to exactly one Client which
means the setter should for Client should not be there in the
first place and was only used during construction.
REVIEW: 104909
A CMake variable is used to specify the name of the binary.
By default this is "kwin" but building for PA changes the
name to "kwinactive". The variable adjusts all names, e.g.
kwinnvidiahack becomes kwinactivenvidiahack.
The remaining usage of kwinrc in core and libs is replaced
by a cmakedefine for the configuration name and all data
installations are moved to the defined name. Dynamic loading
for scripts & co is adjusted for loading based on defined name.
This change allows the side-by-side installation of both kwin
for desktop and kwin for Plasma Desktop without the known
issues like conflicts in config files or missing build options
if kwin desktop is used for Plasma Active.
Likewise the KCMs are not adjusted as they are not intended to
be used for kwinactive.
REVIEW: 104299
BUG: 296084
FIXED-IN: 4.9.0
CCMAIL: active@kde.org
Additional TabBox Mode which allows to switch between all open
windows of the current selected application. By default Alt+tilde
is used which is on qwerty just one key above tab. For non-qwerty
layouts the shortcut is unfortunately not convenient.
REVIEW: 104730
FEATURE: 299308
FIXED-IN: 4.9.0
If the layout name is specified a custom layout config is
passed to the TabBoxHandler with the configured name.
This can be used by Plasma Active to specify the window strip
(overwrites any settings) and for Netbook shell as a replacement
to opening Present Windows Effect.
REVIEW: 104838
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.
For the normal TabBox the TabBoxClient's icon method is
adjusted to use the "user-desktop" icon instead of the
window icon.
For the effects a method to set the caption is extended
to also set the icon on the caption frame.
REVIEW: 104444
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
The grabbed key events inside TabBox are forwarded to the declarative
view which passes it to the normal keyPressedEvent() method. This
allows the QML files to handle keyboard navigation themselves.
The views support key navigation natively, though this cannot be
used as we need to update the ModelIndex when a new item is selected.
Also there seems to be a problem if the tabbox is shown again, in
that case the focus seems to be somehow lost. Because of that the
navigation is handled in the Item embedding the list.
REVIEW: 104357
FEATURE: 291916
FIXED-IN: 4.9.0
This layout is intended to replace the TabBox mode in Present
Windows effect.
The advantages of a layout over the effect are:
* works without compositing
* supports multi-screen in a better way (windows don't move)
* is an overlay on top of the windows instead of reusing the windows
* is not a hack inside the actual effect
* visually consistent with other layouts
- only use bold text for selected windows
- all icons are colored
- row for minimized windows are not fully opaque
- text for minimized windows is no longer italic
REVIEW: 104187
REVIEW: 104340
Acked by Martin Gräßlin
(cherry picked from commit 56345a9f158790e5f7102618c55c600cc688c855)
Conflicts:
kwin/tabbox/declarative.cpp
kwin/tabbox/declarative.h
if when the tabbox is open another window that does -not- appear in the tabbox gets focus, tapping on the same thumbnail as the last active window won't produce any effect, the patch makes sure that window gets activated, even if it has the currentIndex
REVIEW:104096
connecting to a kwindowsystem signal that causes instantiation of
kwindowsystemprivate breaks window focus.
this match makes it use internal kwin signals to track the embedding window geometry
REVIEW:104039