MCPcopy
hub / github.com/paperwm/PaperWM / enableWindowPositionBar

Method enableWindowPositionBar

tiling.js:1714–1737  ·  view source on GitHub ↗

* Enables or disables this space's window position bar. * @param {boolean} enable

(enable = true)

Source from the content-addressed store, hash-verified

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

Callers 5

constructorMethod · 0.95
resizeHandlerFunction · 0.80
remove_handlerFunction · 0.80
focus_handlerFunction · 0.80

Calls 1

Tested by

no test coverage detected