From a35df43e3d2bbcba7addfe2312f8010ae9bc40d3 Mon Sep 17 00:00:00 2001 From: Philip Sterne Date: Thu, 13 Aug 2026 11:06:14 +0200 Subject: [PATCH] fix: activate stacked windows without redundant raising --- src/stack.ts | 16 +++++----------- src/window.ts | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/stack.ts b/src/stack.ts index 60d553bb..04a2aea7 100644 --- a/src/stack.ts +++ b/src/stack.ts @@ -212,10 +212,11 @@ export class Stack { if (this.widgets) this.widgets.tabs.visible = permitted; - this.reset_visibility(permitted); - const win = this.ext.windows.get(entity); - if (!win) return; + if (!win) { + this.reset_visibility(permitted); + return; + } if (!Ecs.entity_eq(entity, this.active)) { this.prev_active = this.active; @@ -662,20 +663,13 @@ export class Stack { // Connect tab-clicked signal c.button_signal = widget.connect('clicked', () => { - this.activate(entity); this.window_exec(comp, entity, (window) => { const actor = window.meta.get_compositor_private(); if (actor) { actor.show(); window.activate(false); - + this.activate(entity); this.reposition(); - - for (const comp of this.tabs) { - this.buttons.get(comp.button)?.set_style_class_name(INACTIVE_TAB); - } - - widget.set_style_class_name(ACTIVE_TAB); } }); }); diff --git a/src/window.ts b/src/window.ts index 2fbd2928..883b5538 100644 --- a/src/window.ts +++ b/src/window.ts @@ -705,7 +705,6 @@ export function activate(ext: Ext, move_mouse: boolean, win: Meta.Window) { win.unminimize(); workspace.activate_with_focus(win, global.get_current_time()); - win.raise(); const pointer_placement_permitted = move_mouse &&