From c668f18ec930bae4e8b84ad255dcea763b21ca54 Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:48:16 +0200 Subject: [PATCH] Fix panel sometimes being behind windows (#2094) --- src/ShellClients/PanelClone.vala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ShellClients/PanelClone.vala b/src/ShellClients/PanelClone.vala index 77b40a50..b082e1cd 100644 --- a/src/ShellClients/PanelClone.vala +++ b/src/ShellClients/PanelClone.vala @@ -63,6 +63,10 @@ public class Gala.PanelClone : Object { } }); + // Make sure the actor is visible once it's focused FIXME: better event not only focused + // https://github.com/elementary/gala/issues/2080 + panel.window.focused.connect (update_visible); + update_visible (); update_clone_position (); @@ -77,6 +81,12 @@ public class Gala.PanelClone : Object { private void update_visible () { actor.visible = !panel_hidden; + + if (actor.visible && !wm.get_display ().get_monitor_in_fullscreen (panel.window.get_monitor ())) { + // The actor has just been revealed, make sure it's at the top + // https://github.com/elementary/gala/issues/2080 + actor.get_parent ().set_child_above_sibling (actor, null); + } } private void update_clone_position () {