首页 > 解决方案 > How to emit signal in KWin scripting API

问题描述

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.

标签: javascriptkde

解决方案



推荐阅读