scripting: Remove unrelated signals

The current state is inconsistent. Some window-specific signals are
exposed in the workspace, some not.

This change drops those signals. One should monitor the signals it's
interested in instead.
master
Vlad Zahorodnii 2 years ago
parent 7fd7c07b30
commit 09fd29dccc

@ -31,7 +31,6 @@ WorkspaceWrapper::WorkspaceWrapper(QObject *parent)
KWin::VirtualDesktopManager *vds = KWin::VirtualDesktopManager::self();
connect(ws, &Workspace::desktopPresenceChanged, this, &WorkspaceWrapper::desktopPresenceChanged);
connect(ws, &Workspace::windowAdded, this, &WorkspaceWrapper::clientAdded);
connect(ws, &Workspace::windowAdded, this, &WorkspaceWrapper::setupClientConnections);
connect(ws, &Workspace::windowRemoved, this, &WorkspaceWrapper::clientRemoved);
connect(ws, &Workspace::windowActivated, this, &WorkspaceWrapper::clientActivated);
connect(vds, &VirtualDesktopManager::desktopCreated, this, &WorkspaceWrapper::desktopsChanged);
@ -57,11 +56,6 @@ WorkspaceWrapper::WorkspaceWrapper(QObject *parent)
Q_EMIT numberScreensChanged(numScreens());
});
connect(Cursors::self()->mouse(), &Cursor::posChanged, this, &WorkspaceWrapper::cursorPosChanged);
const QList<Window *> clients = ws->allClientList();
for (Window *client : clients) {
setupClientConnections(client);
}
}
VirtualDesktop *WorkspaceWrapper::currentDesktop() const
@ -280,14 +274,6 @@ QString WorkspaceWrapper::supportInformation() const
return Workspace::self()->supportInformation();
}
void WorkspaceWrapper::setupClientConnections(Window *client)
{
connect(client, &Window::clientMinimized, this, &WorkspaceWrapper::clientMinimized);
connect(client, &Window::clientUnminimized, this, &WorkspaceWrapper::clientUnminimized);
connect(client, qOverload<Window *, bool, bool>(&Window::clientMaximizedStateChanged),
this, &WorkspaceWrapper::clientMaximizeSet);
}
void WorkspaceWrapper::showOutline(const QRect &geometry)
{
workspace()->outline()->show(geometry);

@ -67,9 +67,6 @@ Q_SIGNALS:
void desktopPresenceChanged(KWin::Window *client, int desktop);
void clientAdded(KWin::Window *client);
void clientRemoved(KWin::Window *client);
void clientMinimized(KWin::Window *client);
void clientUnminimized(KWin::Window *client);
void clientMaximizeSet(KWin::Window *client, bool h, bool v);
void clientActivated(KWin::Window *client);
/**
* This signal is emitted when a virtual desktop is added or removed.
@ -346,9 +343,6 @@ public Q_SLOTS:
* Hides the outline previously shown by showOutline.
*/
void hideOutline();
private Q_SLOTS:
void setupClientConnections(Window *client);
};
class QtScriptWorkspaceWrapper : public WorkspaceWrapper

Loading…
Cancel
Save