mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-10-05 12:37:47 +03:00
fix(kwinscript): arrange after kwin moves a window between screens
...instead of forcing it back where it was. KWin changes a window's size before moving it between screens, so we can't react to a geometry change by always changing it back.
This commit is contained in:
parent
73f43477ec
commit
3c6b367a3a
@ -77,6 +77,12 @@ export interface Controller {
|
||||
*/
|
||||
onWindowResizeStart(window: EngineWindow): void;
|
||||
|
||||
/**
|
||||
* React to window changing screens
|
||||
* @param window the window whose screen has changed
|
||||
*/
|
||||
onWindowScreenChanged(window: EngineWindow): void;
|
||||
|
||||
/**
|
||||
* React to window resize operation end. The window
|
||||
* resize operation ends, when the users drops
|
||||
@ -336,7 +342,11 @@ export class ControllerImpl implements Controller {
|
||||
|
||||
public onWindowGeometryChanged(window: EngineWindow): void {
|
||||
this.log.log(["onWindowGeometryChanged", { window }]);
|
||||
this.engine.enforceSize(window);
|
||||
}
|
||||
|
||||
public onWindowScreenChanged(_window: EngineWindow): void {
|
||||
//TODO only arrange the surface the window came from and went to
|
||||
this.engine.arrange();
|
||||
}
|
||||
|
||||
// NOTE: accepts `null` to simplify caller. This event is a catch-all hack
|
||||
|
@ -370,9 +370,9 @@ export class DriverImpl implements Driver {
|
||||
}
|
||||
});
|
||||
|
||||
this.connect(client.screenChanged, () =>
|
||||
this.controller.onWindowChanged(window, `screen=${client.screen}`)
|
||||
);
|
||||
this.connect(client.screenChanged, () => {
|
||||
this.controller.onWindowScreenChanged(window);
|
||||
});
|
||||
|
||||
this.connect(client.activitiesChanged, () =>
|
||||
this.controller.onWindowChanged(
|
||||
|
Loading…
Reference in New Issue
Block a user