mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +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 Barrier? barrier;
|
||||||
|
|
||||||
private PanelClone clone;
|
private PanelClone? clone = null;
|
||||||
|
|
||||||
private int width = -1;
|
private int width = -1;
|
||||||
private int height = -1;
|
private int height = -1;
|
||||||
@ -44,8 +44,6 @@ public class Gala.PanelWindow : Object {
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.stick ();
|
window.stick ();
|
||||||
|
|
||||||
clone = new PanelClone (wm, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_MUTTER46
|
#if HAS_MUTTER46
|
||||||
@ -71,14 +69,14 @@ public class Gala.PanelWindow : Object {
|
|||||||
this.height = height;
|
this.height = height;
|
||||||
|
|
||||||
position_window ();
|
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) {
|
public void update_anchor (Meta.Side anchor) {
|
||||||
this.anchor = anchor;
|
this.anchor = anchor;
|
||||||
|
|
||||||
position_window ();
|
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 () {
|
private void position_window () {
|
||||||
@ -130,15 +128,20 @@ public class Gala.PanelWindow : Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void set_hide_mode (Pantheon.Desktop.HideMode hide_mode) {
|
public void set_hide_mode (Pantheon.Desktop.HideMode hide_mode) {
|
||||||
clone.hide_mode = hide_mode;
|
|
||||||
|
|
||||||
destroy_barrier ();
|
destroy_barrier ();
|
||||||
|
|
||||||
if (hide_mode != NEVER) {
|
if (hide_mode == NEVER) {
|
||||||
unmake_exclusive ();
|
clone = null;
|
||||||
setup_barrier ();
|
|
||||||
} else {
|
|
||||||
make_exclusive ();
|
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