diff --git a/src/core/controller.cpp b/src/core/controller.cpp index ea8dc6d7..8ab9fb34 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -32,6 +32,8 @@ void Controller::bindEvents() auto &workspace = m_plasmaApi.workspace(); connect(&workspace, &PlasmaApi::Workspace::currentDesktopChanged, this, &Controller::onCurrentSurfaceChanged); connect(&workspace, &PlasmaApi::Workspace::numberScreensChanged, this, &Controller::onSurfaceUpdate); + connect(&workspace, &PlasmaApi::Workspace::screenResized, this, &Controller::onSurfaceUpdate); + connect(&workspace, &PlasmaApi::Workspace::currentActivityChanged, this, &Controller::onCurrentSurfaceChanged); } void Controller::registerAction(const Action &data) diff --git a/src/kwinscript/driver/index.ts b/src/kwinscript/driver/index.ts index de3484bd..0c36c434 100644 --- a/src/kwinscript/driver/index.ts +++ b/src/kwinscript/driver/index.ts @@ -167,22 +167,6 @@ export class DriverImpl implements Driver { } public bindEvents(): void { - const onScreenResized = (screen: number): void => { - const srf = new DriverSurfaceImpl( - screen, - this.proxy.workspace().currentActivity, - this.proxy.workspace().currentDesktop, - this.qml.activityInfo, - this.config, - this.proxy - ); - this.controller.onSurfaceUpdate(); - }; - - const onCurrentActivityChanged = (_activity: string): void => { - this.controller.onCurrentSurfaceChanged(); - }; - const onClientAdded = (client: KWin.Client): void => { this.log.log(`Client added: ${client}`); @@ -238,11 +222,6 @@ export class DriverImpl implements Driver { "unminimized" ); - this.connect(this.kwinApi.workspace.screenResized, onScreenResized); - this.connect( - this.kwinApi.workspace.currentActivityChanged, - onCurrentActivityChanged - ); this.connect(this.kwinApi.workspace.clientAdded, onClientAdded); this.connect(this.kwinApi.workspace.clientRemoved, onClientRemoved); this.connect(this.kwinApi.workspace.clientMaximizeSet, onClientMaximizeSet);