mirror of
https://github.com/elementary/gala.git
synced 2024-08-16 18:40:27 +03:00
ShellClients: Don't keep a clone if we never hide (#1907)
Co-authored-by: Danielle Foré <danielle@elementary.io>
This commit is contained in:
parent
e0e8bb7a70
commit
fe650bfa80
@ -19,7 +19,7 @@ public class Gala.PanelWindow : Object {
|
||||
|
||||
private Barrier? barrier;
|
||||
|
||||
private PanelClone clone;
|
||||
private PanelClone? clone = null;
|
||||
|
||||
private int width = -1;
|
||||
private int height = -1;
|
||||
@ -44,8 +44,6 @@ public class Gala.PanelWindow : Object {
|
||||
});
|
||||
|
||||
window.stick ();
|
||||
|
||||
clone = new PanelClone (wm, this);
|
||||
}
|
||||
|
||||
#if HAS_MUTTER46
|
||||
@ -71,14 +69,14 @@ public class Gala.PanelWindow : Object {
|
||||
this.height = height;
|
||||
|
||||
position_window ();
|
||||
set_hide_mode (clone.hide_mode); // Resetup barriers etc.
|
||||
set_hide_mode (clone == null ? Pantheon.Desktop.HideMode.NEVER : clone.hide_mode); // Resetup barriers etc.
|
||||
}
|
||||
|
||||
public void update_anchor (Meta.Side anchor) {
|
||||
this.anchor = anchor;
|
||||
|
||||
position_window ();
|
||||
set_hide_mode (clone.hide_mode); // Resetup barriers etc.
|
||||
set_hide_mode (clone == null ? Pantheon.Desktop.HideMode.NEVER : clone.hide_mode); // Resetup barriers etc.
|
||||
}
|
||||
|
||||
private void position_window () {
|
||||
@ -130,15 +128,20 @@ public class Gala.PanelWindow : Object {
|
||||
}
|
||||
|
||||
public void set_hide_mode (Pantheon.Desktop.HideMode hide_mode) {
|
||||
clone.hide_mode = hide_mode;
|
||||
|
||||
destroy_barrier ();
|
||||
|
||||
if (hide_mode != NEVER) {
|
||||
unmake_exclusive ();
|
||||
setup_barrier ();
|
||||
} else {
|
||||
if (hide_mode == NEVER) {
|
||||
clone = null;
|
||||
make_exclusive ();
|
||||
} else {
|
||||
unmake_exclusive ();
|
||||
|
||||
if (clone == null) {
|
||||
clone = new PanelClone (wm, this);
|
||||
}
|
||||
clone.hide_mode = hide_mode;
|
||||
|
||||
setup_barrier ();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user