https://bugs.kde.org/show_bug.cgi?id=449181
Bug ID: 449181
Summary: kwin scripting client signal argument undefined
Product: kwin
Version: 5.23.5
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: scripting
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
According to the documentation[1] and code[2], the KWin::Toplevel::windowClosed
signal should be usable from the js script, and have two parameters. However,
on the js side, the handler gets nothing.
[1]: https://develop.kde.org/docs/extend/plasma/kwin/api/#signals-2
[2]: https://invent.kde.org/plasma/kwin/-/blob/master/src/toplevel.h#L578
STEPS TO REPRODUCE
1. Start the scripting console: `plasma-interactiveconsole --kwin`
2. Enter the following test script and execute it
```js
function closedHandler() {
console.log('all args in closed handler are ', JSON.stringify(arguments));
}
workspace.clientMaximizeSet.connect(function(client) {
console.log('client is ', client);
client.windowClosed.connect(closedHandler);
});
```
3. Create a new window, i.e. konsole
4. Maximize the konsole window
5. Directly close the konsole window
OBSERVED RESULT
The kwin output:
```
js: client is KWin::X11Client(0x555f1610a7f0)
js: all args in closed handler are {}
```
The closed handler was correctly installed, but didn't get any argument.
EXPECTED RESULT
The closed handler gets 2 arguments as documented.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.1-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-10750H CPU @ 2.60GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
ADDITIONAL INFORMATION
First reported here:
https://github.com/Aetf/kwin-maxmize-to-new-desktop/issues/14
--
You are receiving this mail because:
You are watching all bug changes.