https://bugs.kde.org/show_bug.cgi?id=370185

--- Comment #9 from Chris Holland <zrenf...@gmail.com> ---
Some debug logging:

kwin_tabbox: TabBox::keyPress              150994962
kwin_tabbox: TabBox::grabbedKeyEvent        16777234
kwin_tabbox: TabBoxHandler::grabbedKeyEvent 16777234
kwin_tabbox:     d->m_mainItem && d->window()
kwin_tabbox:     d->window() PlasmaQuick::Dialog(0x15bcc30 exposed,
visibility=QWindow::Visibility(Windowed),
flags=QFlags<Qt::WindowType>(X11BypassWindowManagerHint|FramelessWindowHint),
geometry=498,441 932x206)
kwin_tabbox:     d->window()->contentItem() QQuickRootItem(0x15820e0,
parent=0x0, geometry=0,0 932x206)
kwin_tabbox:     d->window()->sendEvent Plasma::FrameSvgItem(0x15be890,
parent=0x15820e0, geometry=0,0 932x206)
kwin_tabbox:     d->window()->sendEvent ColorScope(0x16862a0, parent=0x0,
geometry=0,0 0x0)

Okay, for some reason TabBoxHandler::grabbedKeyEvent is calling sendEvent to a
ColorScope?

We can easily find where it defines PlasmaCore.Dialog is the parent of the
FrameSvgItem:
https://github.com/KDE/plasma-framework/blob/master/src/plasmaquick/dialog.cpp#L758

The only other child of the contentItem() is the Dialog::mainItem.
https://github.com/KDE/plasma-framework/blob/master/src/plasmaquick/dialog.cpp#L797

Wait, I just noticed the `ColorScope`'s `parent=0x0`, which means the Dialog is
not the "parent"? Uhg. Does that mean it is not the mainItem()?

I'm testing with my "Thumbnail Grid" skin, which is similar to the default
skins in kdeplasma-addons/windowswitchers, Breeze's in plasma-workspace.

*
https://github.com/Zren/kwin-tabbox-thumbnail_grid/blob/master/package/contents/ui/main.qml
*
https://github.com/KDE/kdeplasma-addons/blob/master/windowswitchers/thumbnails/contents/ui/main.qml
*
https://github.com/KDE/plasma-workspace/blob/master/lookandfeel/contents/windowswitcher/WindowSwitcher.qml

Actually why do we even care about the children of `contentItem()`?! Why not
just iterate the children of the `window()` (the PlasmaCore.Dialog)?

-    const QList<QQuickItem*> items =
d->window()->contentItem()->findChildren<QQuickItem*>(QString(),
Qt::FindDirectChildrenOnly);
+    const QList<QQuickItem*> items =
d->window()->findChildren<QQuickItem*>(QString(), Qt::FindDirectChildrenOnly);

Aha! It works!

https://www.youtube.com/watch?v=S8RL9NlHL8g

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to