With the KWin scripting API, I know I can connect a signal with
client.signal.connect(myFunction);
to trigger some action when the script receives a signal.
But how can I emit a signal from my KWin script for other components to pick up?
I want something like
client.emit(signal);
but couldn't find anything in the API documentation and unsuccessfully tried various possible syntaxes.
My use case is that I want to emit a clientStartUserMovedResized
signal before doing a geometry change, so that another script can detect that a window is about to be changed with the window with the old geometry passed over, before the clientGeometryChanged
signal is automatically emitted after the change in geometry has already happened and the old geometry is lost.
As answered on reddit https://old.reddit.com/r/kde/comments/qndb0k/how_to_emit_signal_in_kwin_scripting_api/
Pretty sure you just call it as a normal function.
client.clientStartUserMovedResized(client)
(not sure why it needs a references to itself as a parameter)