Fix panel sometimes being behind windows (#2094)

This commit is contained in:
Leonhard 2024-10-24 14:48:16 +02:00 committed by GitHub
parent 66b8df209c
commit c668f18ec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 () {