mirror of
https://github.com/Bismuth-Forge/bismuth.git
synced 2024-09-11 00:15:37 +03:00
refactor: rename KWinWindow to DriverWindow
This commit is contained in:
parent
d44eb13fb7
commit
3241774800
@ -5,7 +5,7 @@
|
||||
|
||||
import { DriverSurface } from "./surface";
|
||||
import { DriverSurfaceImpl } from "./surface";
|
||||
import { KWinWindow } from "./window";
|
||||
import { DriverWindowImpl } from "./window";
|
||||
|
||||
import { Controller } from "../controller";
|
||||
import { Action } from "../controller/action";
|
||||
@ -71,7 +71,7 @@ export class KWinDriver implements DriverContext {
|
||||
public set currentWindow(window: EngineWindow | null) {
|
||||
if (window !== null) {
|
||||
this.kwinApi.workspace.activeClient = (
|
||||
window.window as KWinWindow
|
||||
window.window as DriverWindowImpl
|
||||
).client;
|
||||
}
|
||||
}
|
||||
@ -124,10 +124,16 @@ export class KWinDriver implements DriverContext {
|
||||
|
||||
this.controller = controller;
|
||||
this.windowMap = new WrapperMap(
|
||||
(client: KWin.Client) => KWinWindow.generateID(client),
|
||||
(client: KWin.Client) => DriverWindowImpl.generateID(client),
|
||||
(client: KWin.Client) =>
|
||||
new EngineWindowImpl(
|
||||
new KWinWindow(client, this.qml, this.kwinApi, this.config, this.log),
|
||||
new DriverWindowImpl(
|
||||
client,
|
||||
this.qml,
|
||||
this.kwinApi,
|
||||
this.config,
|
||||
this.log
|
||||
),
|
||||
this.config,
|
||||
this.log
|
||||
)
|
||||
@ -200,7 +206,7 @@ export class KWinDriver implements DriverContext {
|
||||
const maximized = h === true && v === true;
|
||||
const window = this.windowMap.get(client);
|
||||
if (window) {
|
||||
(window.window as KWinWindow).maximized = maximized;
|
||||
(window.window as DriverWindowImpl).maximized = maximized;
|
||||
this.controller.onWindowMaximizeChanged(window, maximized);
|
||||
}
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ export interface DriverWindow {
|
||||
visible(srf: DriverSurface): boolean;
|
||||
}
|
||||
|
||||
export class KWinWindow implements DriverWindow {
|
||||
export class DriverWindowImpl implements DriverWindow {
|
||||
public static generateID(client: KWin.Client): string {
|
||||
return `${String(client)}/${client.windowId}`;
|
||||
}
|
||||
@ -150,7 +150,7 @@ export class KWinWindow implements DriverWindow {
|
||||
private log: Log
|
||||
) {
|
||||
this.client = client;
|
||||
this.id = KWinWindow.generateID(client);
|
||||
this.id = DriverWindowImpl.generateID(client);
|
||||
this.maximized = false;
|
||||
this.noBorderManaged = false;
|
||||
this.noBorderOriginal = client.noBorder;
|
||||
|
Loading…
Reference in New Issue
Block a user