We need to send the event to a QQuickItem which accepts focus. Just
sending it to the Window or to the contentItem doesn't work as there is
no activeFocusItem (might be related to having the keyboard grabbed).
We try to send the event to all children of the Window's content item.
There should hopefully be one item which accepts the event and properly
reacts on cursor keys.
REVIEW: 118471
Both were only added for the use case of Plasma Active. In the next
iteration we won't need the embedded any more as Plasma is able to draw
thumbnails by itself. So there is neither need for the embedded
functionality nor for the D-Bus interface.
REVIEW: 118464
We don't have access to the margins specified in anchors resulting in
incorrect thumbnail position. To fix this we need to create a dummy item
which does the anchoring and the thumbnail needs to just be an
anchors.fill: parent.
REVIEW: 118113
Simplifies the code quite a bit by no longer needing an extra item for
the selected caption.
As a nice side effect it fixes a binding loop.
BUG: 334537
REVIEW: 118112
The hack to get the model data from the currently selected item to the
areas outside the list view apparently broke in Qt. Now we have to export
the model data elements we actually use.
BUG: 334478
REVIEW: 118047
Instead of passing the macro based Predicate to findUnmanaged it now
expects a function which can be passed to std::find_if.
Existing code like:
xcb_window_t window; // our test window
Unmanaged *u = findUnmanaged(WindowMatchPredicated(window));
becomes:
Unmanaged *u = findUnmanaged([window](const Unmanaged *u) {
return u->window() == window;
});
In addition an overload is added which takes the window id to cover
the common case to search for an Unmanaged by its ID. The above example
becomes:
Unmanaged *u = findUnmanaged(window);
The advantage is that it is way more flexible and has the logic what
to check for directly with the code and not hidden in the macro
definition.
Forward all key press events to the TabBox if it is currently grabbed and
connect the TabBox to the modifiers changed signal for checking if TabBox
should be ended.
Instead of having it's own QQmlEngine TabBox just uses the newly
exposed engine from Scripting and creates a new context for it's
own usage.
REVIEW: 116565
After changes in PlasmaCore.Dialog we can finally get rid of updating
the position on each visible change.
It's not 100 % perfect yet, seems the binding on screenGeometry is not
working properly. That needs investigation.
Used to be the QQuickView implementation for the tabbox. As it's now
controlled through opening windows from QML directly it's no longer
needed or used anywhere.
No longer needed in a Plasma2 world as the components have a thumbnail
component, so the hack to go over KWin to render the thumbnails is no
longer needed.
Approved by Aaron on mailinglist:
https://mail.kde.org/pipermail/active/2013-December/007254.html
By not using a QQuickView it becomes possible to just use a
PlasmaCore.Dialog or a Quick.Window in the TabBox qml and thus it's
possible to simplify the qml code.
To support this a new SwitcherItem is introduced and exported to QML.
It's a simple QObject providing all the properties which used to be
exported to the root context. A declarative TabBox is expected to
use one of these items. The C++ side finds the Switcher and for that
supports the case that the SwitcherItem is the rootItem or a child
item.
A declarative TabBox has also to create a QQuickWindow, e.g. a
PlasmaCore.Dialog. The visibility of that window should be controlled
through the visible property on the SwitcherItem. The underlying C++
implementation assumes that a TabBox only uses one window (it needs to
get destroyed once it's hidden and included in highlight windows).
Thanks to this change it's no longer needed to reload the TabBox
whenever it gets shown or the alternative TabBox gets shown. Instead
the same QML script can get reused. Other created switchers are ignored
as the visible property won't be changed to true.
The modalActionSwitch was used to disable all of KWin's actions during
Alt+Tab. This is not needed as Alt+Tab uses a keyboard grab and thus
no action will be triggered anyway.
Furthermore the functionality had been broken for years. The effects
use an own KActionCollection so their actions aren't considered and
neither the scripts.
Client used to have dedicated methods for different icon sizes instead
of combining all pixmaps into one QIcon. This resulted in various parts
of KWin having different access to the icons:
* effects only got one pixmap of size 32x32
* decorations only got the 16x16 and 32x32 pixmaps combined into a QIcon
* tabbox could request all icon sizes, but only as pixmap
Now all sizes are available in one QIcon allowing to easily access the
best fitting icon in a given UI.