WindowRuleEnforcer.shouldTile: remove Clients.canTileNow call
This commit is contained in:
@@ -11,14 +11,12 @@ class WindowRuleEnforcer {
|
||||
}
|
||||
|
||||
public shouldTile(kwinClient: KwinClient) {
|
||||
return Clients.canTileNow(kwinClient) && (
|
||||
this.preferTiling.matches(kwinClient) || (
|
||||
kwinClient.normalWindow &&
|
||||
!kwinClient.transient &&
|
||||
kwinClient.managed &&
|
||||
kwinClient.pid > -1 &&
|
||||
!this.preferFloating.matches(kwinClient)
|
||||
)
|
||||
return this.preferTiling.matches(kwinClient) || (
|
||||
kwinClient.normalWindow &&
|
||||
!kwinClient.transient &&
|
||||
kwinClient.managed &&
|
||||
kwinClient.pid > -1 &&
|
||||
!this.preferFloating.matches(kwinClient)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +28,7 @@ class WindowRuleEnforcer {
|
||||
const enforcer = this;
|
||||
const manager = new SignalManager();
|
||||
manager.connect(kwinClient.captionChanged, () => {
|
||||
const shouldTile = enforcer.shouldTile(kwinClient);
|
||||
const shouldTile = Clients.canTileNow(kwinClient) && enforcer.shouldTile(kwinClient);
|
||||
world.do((clientManager, desktopManager) => {
|
||||
const desktop = desktopManager.getDesktopForClient(kwinClient);
|
||||
if (shouldTile && desktop !== undefined) {
|
||||
|
||||
@@ -32,7 +32,7 @@ class ClientManager {
|
||||
let constructState: (client: ClientWrapper) => ClientState.State;
|
||||
if (kwinClient.dock) {
|
||||
constructState = () => new ClientState.Docked(this.world, kwinClient);
|
||||
} else if (this.windowRuleEnforcer.shouldTile(kwinClient) && desktop !== undefined) {
|
||||
} else if (Clients.canTileNow(kwinClient) && this.windowRuleEnforcer.shouldTile(kwinClient) && desktop !== undefined) {
|
||||
constructState = (client: ClientWrapper) => new ClientState.Tiled(this.world, client, desktop.grid);
|
||||
} else {
|
||||
constructState = (client: ClientWrapper) => new ClientState.Floating(this.world, client, this.config, false);
|
||||
|
||||
Reference in New Issue
Block a user