Skip to content

Commit 924bf09

Browse files
mmstickjackpot51
authored andcommitted
fix: Floating windows not showing their active hint on workspace move
1 parent 5f293ad commit 924bf09

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/window.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ export class ShellWindow {
417417
let border = this.border;
418418

419419
const permitted = () => {
420-
return this.ext.focus_window() == this
420+
return this.actor_exists()
421+
&& this.ext.focus_window() == this
421422
&& !this.meta.is_fullscreen()
422423
&& (!this.is_single_max_screen() || this.is_snap_edge())
423424
&& !this.meta.minimized
@@ -427,16 +428,19 @@ export class ShellWindow {
427428
if (this.meta.appears_focused) {
428429
border.show();
429430

431+
// Focus will be re-applied to fix windows moving across workspaces
432+
let applications = 0
433+
430434
// Ensure that the border is shown
431435
if (ACTIVE_HINT_SHOW_ID !== null) GLib.source_remove(ACTIVE_HINT_SHOW_ID)
432436
ACTIVE_HINT_SHOW_ID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 600, () => {
433-
if (!this.same_workspace() || border.visible || !permitted()) {
437+
if (applications > 4 && !this.same_workspace() || !permitted()) {
434438
ACTIVE_HINT_SHOW_ID = null
435439
return GLib.SOURCE_REMOVE
436440
}
437441

442+
applications += 1
438443
border.show()
439-
440444
return GLib.SOURCE_CONTINUE
441445
})
442446
}

0 commit comments

Comments
 (0)