Bug 385595 - KWin::WorkspaceWrapper signal clientAdded(KWin::Client *client) doesn't trigger on Wayland
Summary: KWin::WorkspaceWrapper signal clientAdded(KWin::Client *client) doesn't trigg...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 5.11.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-11 11:44 UTC by jasu.koponen
Modified: 2020-09-30 18:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jasu.koponen 2017-10-11 11:44:00 UTC
KWin Scripts can't detect new clients on Wayland, unless the program is using XWayland. 


Steps to reproduce: 

1. Open the "WM Console" through KRunner.

2. Insert the following:
workspace.clientAdded.connect(function() { print("added"); })
workspace.clientRemoved.connect(function() { print("removed"); })

3. Execute

4. Start a Qt program and the script prints nothing, start a GTK2 program and the script prints "added". When removing a Qt program the script prints "removed".
Comment 1 Martin Flöser 2017-10-11 15:03:33 UTC
Yes, this is on purpose. We don't have a security concept yet for Scripts on Wayland, so Wayland windows are excluded from scripting.

I have an idea for how to implement the security. Once that is in, scripting will be activated.
Comment 2 avlas 2018-06-22 13:47:07 UTC
wondering whether there is any progress regarding this issue... thanks!