* Enables or disables this space's window position bar. * @param {boolean} enable
(enable = true)
| 1712 | * @param {boolean} enable |
| 1713 | */ |
| 1714 | enableWindowPositionBar(enable = true) { |
| 1715 | const add = enable && this.showPositionBar; |
| 1716 | if (add) { |
| 1717 | // [this.windowPositionBarBackdrop, this.windowPositionBar] |
| 1718 | // .forEach(i => { |
| 1719 | // if (!i.get_parent()) { |
| 1720 | // this.actor.add_child(i); |
| 1721 | // } |
| 1722 | // }); |
| 1723 | Utils.actor_add_child(this.actor, this.windowPositionBarBackdrop); |
| 1724 | Utils.actor_add_child(this.actor, this.windowPositionBar); |
| 1725 | this.updateWindowPositionBar(); |
| 1726 | } |
| 1727 | else { |
| 1728 | // [this.windowPositionBarBackdrop, this.windowPositionBar] |
| 1729 | // .forEach(i => { |
| 1730 | // if (i.get_parent()) { |
| 1731 | // this.actor.remove_child(i); |
| 1732 | // } |
| 1733 | // }); |
| 1734 | Utils.actor_remove_child(this.actor, this.windowPositionBarBackdrop); |
| 1735 | Utils.actor_remove_child(this.actor, this.windowPositionBar); |
| 1736 | } |
| 1737 | } |
| 1738 | |
| 1739 | updateWindowPositionBar() { |
| 1740 | // if pref show-window-position-bar, exit |
no test coverage detected