Bug 330100

Summary: Property client.tabGroup doesn't exist
Product: [Plasma] kwin Reporter: Fabian Homborg <FHomborg>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: bugs.kde.org
Priority: NOR    
Version: 4.11.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Fabian Homborg 2014-01-17 20:39:06 UTC
The property client.tabGroup is always undefined, which means that currently handling tabgroups is only possible with really ugly hacks.



Reproducible: Always

Steps to Reproduce:
workspace.clientAdded.connect(function(client) {
	client.tabGroupChanged.connect(function() {
		print("Client", client.resourceClass.toString(), "changed tabgroup");
		print(client.tabGroup);
		});
});

Actual Results:  
Client dolphin changed tabgroup
undefined


Expected Results:  
Client dolphin changed tabgroup
<object>
Comment 1 Thomas Lübking 2014-01-17 21:36:08 UTC
tabGroup is a TabGroup* and TabGroup is not QObject.

It should either not be exported to scripting or somehow end there as long integer (pointer being an unique ID)

eg.
Q_PROPERTY(long uint tabGroupId READ tabGroupId NOTIFY tabGroupChanged SCRIPTABLE false)

long uint tabGroupId() { return static_cast<long uint>(tabGroup()); }
Comment 2 Fabian Homborg 2014-01-18 00:20:37 UTC
The latter would be okay for my case - I just need to find out which clients are tabbed together so that tiling doesn't try to pull them apart.

The former I've got right now, and it's not pretty (https://github.com/faho/kwin-tiling/blob/master/contents/code/tilelist.js#L256), but seems to work.
Comment 3 Justin Zobel 2021-03-10 00:12:25 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.