mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-17 11:37:10 +03:00
refactor: port screenResized and currentActivityChanged signals
This commit is contained in:
parent
e8cd561eee
commit
7b81428a79
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user