From 76872f90b7ecb108923c5069977a5765b3ef5d8b Mon Sep 17 00:00:00 2001 From: ChrisMiuchiz Date: Mon, 15 Feb 2021 18:23:01 -0500 Subject: [PATCH] Don't show border on maximized windows --- src/extension.ts | 2 +- src/window.ts | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index dfe32dd5..8e6187dd 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -779,7 +779,7 @@ export class Ext extends Ecs.System { const focus = this.focus_window(); if (focus) { - focus.show_border(); + focus.update_border_state(); } } diff --git a/src/window.ts b/src/window.ts index c35ed549..6eba6f66 100644 --- a/src/window.ts +++ b/src/window.ts @@ -301,7 +301,7 @@ export class ShellWindow { ext.tween_signals.delete(entity_string); if (meta.appears_focused) { this.update_border_layout(); - this.show_border(); + this.update_border_state(); } }; @@ -390,16 +390,19 @@ export class ShellWindow { }) } - show_border() { + update_border_state() { this.restack(); if (this.ext.settings.active_hint()) { let border = this.border; if (!this.meta.is_fullscreen() && + !this.is_maximized() && !this.meta.minimized && - this.same_workspace()) { - if (this.meta.appears_focused) { + this.same_workspace() && + this.meta.appears_focused) { border.show(); - } + } + else { + border.hide(); } } } @@ -532,12 +535,12 @@ export class ShellWindow { private window_changed() { this.update_border_layout(); - this.show_border(); + this.update_border_state(); } private window_raised() { this.restack(RESTACK_STATE.RAISED); - this.show_border(); + this.update_border_state(); if (this.ext.conf.move_pointer_on_switch && !pointer_already_on_window(this.meta)) { place_pointer_on(this.ext.conf.default_pointer_position, this.meta); }