Skip to content

Commit c668f18

Browse files
authored
Fix panel sometimes being behind windows (#2094)
1 parent 66b8df2 commit c668f18

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ShellClients/PanelClone.vala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ public class Gala.PanelClone : Object {
6363
}
6464
});
6565

66+
// Make sure the actor is visible once it's focused FIXME: better event not only focused
67+
// https://github.com/elementary/gala/issues/2080
68+
panel.window.focused.connect (update_visible);
69+
6670
update_visible ();
6771
update_clone_position ();
6872

@@ -77,6 +81,12 @@ public class Gala.PanelClone : Object {
7781

7882
private void update_visible () {
7983
actor.visible = !panel_hidden;
84+
85+
if (actor.visible && !wm.get_display ().get_monitor_in_fullscreen (panel.window.get_monitor ())) {
86+
// The actor has just been revealed, make sure it's at the top
87+
// https://github.com/elementary/gala/issues/2080
88+
actor.get_parent ().set_child_above_sibling (actor, null);
89+
}
8090
}
8191

8292
private void update_clone_position () {

0 commit comments

Comments
 (0)