scripting: Rename Workspace.{clientAdded,clientRemoved} signals

This commit is contained in:
Vlad Zahorodnii 2023-08-23 11:38:49 +03:00
parent b39ca36d21
commit 52604c5d73
4 changed files with 6 additions and 6 deletions

View file

@ -15,7 +15,7 @@ function setupConnection(client) {
client.skipTaskbarChanged.connect(client, synchronizeSwitcher);
}
workspace.clientAdded.connect(setupConnection);
workspace.windowAdded.connect(setupConnection);
// connect all existing clients
var clients = workspace.clientList();
for (var i=0; i<clients.length; i++) {

View file

@ -34,5 +34,5 @@ function setup(window) {
});
}
workspace.clientAdded.connect(setup);
workspace.windowAdded.connect(setup);
workspace.clientList().forEach(setup);

View file

@ -31,8 +31,8 @@ WorkspaceWrapper::WorkspaceWrapper(QObject *parent)
{
KWin::Workspace *ws = KWin::Workspace::self();
KWin::VirtualDesktopManager *vds = KWin::VirtualDesktopManager::self();
connect(ws, &Workspace::windowAdded, this, &WorkspaceWrapper::clientAdded);
connect(ws, &Workspace::windowRemoved, this, &WorkspaceWrapper::clientRemoved);
connect(ws, &Workspace::windowAdded, this, &WorkspaceWrapper::windowAdded);
connect(ws, &Workspace::windowRemoved, this, &WorkspaceWrapper::windowRemoved);
connect(ws, &Workspace::windowActivated, this, &WorkspaceWrapper::windowActivated);
connect(vds, &VirtualDesktopManager::desktopCreated, this, &WorkspaceWrapper::desktopsChanged);
connect(vds, &VirtualDesktopManager::desktopRemoved, this, &WorkspaceWrapper::desktopsChanged);

View file

@ -68,8 +68,8 @@ private:
Q_DISABLE_COPY(WorkspaceWrapper)
Q_SIGNALS:
void clientAdded(KWin::Window *client);
void clientRemoved(KWin::Window *client);
void windowAdded(KWin::Window *window);
void windowRemoved(KWin::Window *window);
void windowActivated(KWin::Window *window);
/**
* This signal is emitted when a virtual desktop is added or removed.