From 2f4268fc9431e2115bf78a1b9fbfcffb0a100c08 Mon Sep 17 00:00:00 2001 From: Peter Fajdiga Date: Sun, 20 Aug 2023 00:00:54 +0200 Subject: [PATCH] mark remaining methods and fields explicitly public or private --- src/world/ClientStateDocked.ts | 2 +- src/world/ClientStateManager.ts | 10 +++++----- src/world/ClientStateTiled.ts | 2 +- src/world/ClientWrapper.ts | 24 ++++++++++++------------ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/world/ClientStateDocked.ts b/src/world/ClientStateDocked.ts index 56e8191..b4c99c1 100644 --- a/src/world/ClientStateDocked.ts +++ b/src/world/ClientStateDocked.ts @@ -8,7 +8,7 @@ class ClientStateDocked { world.onScreenResized(); } - destroy(passFocus: boolean) { + public destroy(passFocus: boolean) { this.signalManager.destroy(); this.world.onScreenResized(); } diff --git a/src/world/ClientStateManager.ts b/src/world/ClientStateManager.ts index 68d7d07..8269f7c 100644 --- a/src/world/ClientStateManager.ts +++ b/src/world/ClientStateManager.ts @@ -5,16 +5,16 @@ class ClientStateManager { this.state = initialState; } - setState(newState: ClientState, passFocus: boolean) { + public setState(newState: ClientState, passFocus: boolean) { this.state.destroy(passFocus); this.state = newState; } - getState() { + public getState() { return this.state; } - destroy(passFocus: boolean) { + public destroy(passFocus: boolean) { this.state.destroy(passFocus); } } @@ -22,9 +22,9 @@ class ClientStateManager { type ClientState = ClientStateTiled | ClientStateTiledMinimized | ClientStateFloating | ClientStateDocked; class ClientStateTiledMinimized { - destroy(passFocus: boolean) {} + public destroy(passFocus: boolean) {} } class ClientStateFloating { - destroy(passFocus: boolean) {} + public destroy(passFocus: boolean) {} } diff --git a/src/world/ClientStateTiled.ts b/src/world/ClientStateTiled.ts index b1cb19c..6287fe9 100644 --- a/src/world/ClientStateTiled.ts +++ b/src/world/ClientStateTiled.ts @@ -1,5 +1,5 @@ class ClientStateTiled { - readonly window: Window; + public readonly window: Window; private readonly signalManager: SignalManager; constructor(world: World, client: ClientWrapper, grid: Grid) { diff --git a/src/world/ClientWrapper.ts b/src/world/ClientWrapper.ts index ce862de..6208b39 100644 --- a/src/world/ClientWrapper.ts +++ b/src/world/ClientWrapper.ts @@ -27,7 +27,7 @@ class ClientWrapper { this.manipulatingGeometry = new Doer(); } - place(x: number, y: number, width: number, height: number) { + public place(x: number, y: number, width: number, height: number) { this.manipulatingGeometry.do(() => { if (this.kwinClient.resize) { // window is being manually resized, prevent fighting with the user @@ -56,47 +56,47 @@ class ClientWrapper { } } - focus() { + public focus() { workspace.activeClient = this.kwinClient; } - isFocused() { + public isFocused() { return workspace.activeClient === this.kwinClient; } - setMaximize(horizontally: boolean, vertically: boolean) { + public setMaximize(horizontally: boolean, vertically: boolean) { this.manipulatingGeometry.do(() => { this.kwinClient.setMaximize(vertically, horizontally); }); } - setFullScreen(fullScreen: boolean) { + public setFullScreen(fullScreen: boolean) { this.manipulatingGeometry.do(() => { this.kwinClient.fullScreen = fullScreen; }); } - setShade(shade: boolean) { + public setShade(shade: boolean) { this.manipulatingGeometry.do(() => { this.kwinClient.shade = shade; }); } - isShaded() { + public isShaded() { return this.kwinClient.shade; } - isManipulatingGeometry() { + public isManipulatingGeometry() { return this.manipulatingGeometry.isDoing(); } - prepareForTiling() { + public prepareForTiling() { this.kwinClient.keepBelow = true; this.setFullScreen(false); this.setMaximize(false, false); } - prepareForFloating(screenSize: QRect) { + public prepareForFloating(screenSize: QRect) { this.kwinClient.keepBelow = false; this.setShade(false); this.setFullScreen(false); @@ -142,7 +142,7 @@ class ClientWrapper { } } - destroy(passFocus: boolean) { + public destroy(passFocus: boolean) { this.stateManager.destroy(passFocus); this.signalManager.destroy(); if (this.rulesSignalManager !== null) { @@ -156,7 +156,7 @@ class ClientWrapper { } } - static initSignalManager(client: ClientWrapper) { + private static initSignalManager(client: ClientWrapper) { const manager = new SignalManager(); manager.connect(client.kwinClient.frameGeometryChanged, (kwinClient: TopLevel, oldGeometry: QRect) => { if (client.stateManager.getState() instanceof ClientStateTiled) {