Skip to content

Commit 0358b15

Browse files
committed
fix: Prevent active hint being shown if quickly minimized after focus
1 parent 89c9124 commit 0358b15

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/window.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,22 @@ export class ShellWindow {
417417
this.restack();
418418
if (this.ext.settings.active_hint()) {
419419
let border = this.border;
420-
if (!this.meta.is_fullscreen() &&
421-
(!this.is_single_max_screen() || this.is_snap_edge()) &&
422-
!this.meta.minimized &&
423-
this.same_workspace()) {
420+
421+
const permitted = () => {
422+
return !this.meta.is_fullscreen() &&
423+
(!this.is_single_max_screen() || this.is_snap_edge()) &&
424+
!this.meta.minimized &&
425+
this.same_workspace()
426+
}
427+
428+
if (permitted()) {
424429
if (this.meta.appears_focused) {
425430
border.show();
426431

427432
// Ensure that the border is shown
428433
if (ACTIVE_HINT_SHOW_ID !== null) GLib.source_remove(ACTIVE_HINT_SHOW_ID)
429434
ACTIVE_HINT_SHOW_ID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 600, () => {
430-
if (!this.same_workspace() || border.visible) {
435+
if (!this.same_workspace() || border.visible || !permitted()) {
431436
ACTIVE_HINT_SHOW_ID = null
432437
return GLib.SOURCE_REMOVE
433438
}

0 commit comments

Comments
 (0)