D15720: [TabBox] Fix Arrow Key / Keyboard Events in QML Alt+Tab Skins

Chris Holland <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
Zren added a comment.


  I confirmed that `contentItem()->childItems()` did indeed send it to `mainItem`. It also sends it to the FrameSvgItem too. It no longer sends it to the mysterious ColorScope.
  
    kwin_tabbox:     d->window() PlasmaQuick::Dialog(0x11927d0 exposed, ...)
    kwin_tabbox:     d->window()->contentItem() QQuickRootItem(0x117b820, parent=0x0, geometry=0,0 1240x404)
    kwin_tabbox:     d->window()->sendEvent Plasma::FrameSvgItem(0x11a5910, parent=0x117b820, geometry=0,0 1240x404)
    kwin_tabbox:     d->window()->sendEvent QQuickItem_QML_52(0x10f2090, parent=0x117b820, geometry=4,4 1232x396)
  
  
  
  > Maybe, it should be fixed in Plasma::Dialog instead?
  
  That's what I was afraid of.
  
  Thanks for telling me about the differences of QQuickItem::setParentItem() <http://doc.qt.io/qt-5/qquickitem.html#parent-prop>. Totally missed that. So I assume that is suppose to be `QObject::setParent()`? Changing `dialog.cpp` would require a crapload of testing.
  
  I decided to check what `mainItem.parent` is right now, and it looks like it's `QQuickRootItem`. A normal Item defined in a property has a parent of null.
  
    PlasmaCore.Dialog {
    	id: dialog
    	mainItem: Item {
    		id: dialogMainItem
    
    		Component.onCompleted: {
    			// Before:
    			//   dialogMainItem.parent = ?
    			//   dialogMainItem.parentItem = dialog.contentItem()
    
    			// qml: dialog PlasmaQuick::Dialog(0xd8e650)
    			// qml: dialogMainItem QQuickItem_QML_49(0xdf3d00)
    			// qml: dialogMainItem.parent QQuickRootItem(0xd84180)
    
    			// After:
    			//   dialogMainItem.parent = dialog.contentItem()
    			//   dialogMainItem.parentItem = ?
    
    			// ?
    		}
    	}
    
    	property Item testItem: Item {
    		id: dialogTestItem
    		Component.onCompleted: {
    			console.log('dialogTestItem', dialogTestItem)
    			console.log('dialogTestItem.parent', dialogTestItem.parent)
    			// qml: dialogTestItem QQuickItem(0x101cf70)
    			// qml: dialogTestItem.parent null
    		}
    	}
    }

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D15720

To: Zren
Cc: zzag, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.