From 7f9c96a5a1e619c03bf81c8b3783703b780edaf4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Jun 2023 15:38:09 +0200 Subject: Adding upstream version 20230618. Signed-off-by: Daniel Baumann --- extensions/vertical-workspaces/layout.js | 71 -------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 extensions/vertical-workspaces/layout.js (limited to 'extensions/vertical-workspaces/layout.js') diff --git a/extensions/vertical-workspaces/layout.js b/extensions/vertical-workspaces/layout.js deleted file mode 100644 index 29d97ad..0000000 --- a/extensions/vertical-workspaces/layout.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Vertical Workspaces - * layout.js - * - * panel barrier should follow panel position - * or disable it to not collide with Custom Hot Corners barriers - * - * @author GdH - * @copyright 2022 - 2023 - * @license GPL-3.0 - * - */ - -'use strict'; - -const { Meta } = imports.gi; - -const Main = imports.ui.main; -const Layout = imports.ui.layout; - -const Me = imports.misc.extensionUtils.getCurrentExtension(); -const _Util = Me.imports.util; - -let _overrides; -let opt; - -function update(reset = false) { - if (_overrides) { - _overrides.removeAll(); - } - - if (reset) { - _overrides = null; - opt = null; - return; - } - - opt = Me.imports.settings.opt; - - _overrides = new _Util.Overrides(); - - _overrides.addOverride('LayoutManager', Layout.LayoutManager.prototype, LayoutManager); - - Main.layoutManager._updatePanelBarrier(); -} - -var LayoutManager = { - _updatePanelBarrier: function() { - if (this._rightPanelBarrier) { - this._rightPanelBarrier.destroy(); - this._rightPanelBarrier = null; - } - - // disable the barrier - return; - - if (!this.primaryMonitor) - return; - - if (this.panelBox.height) { - let primary = this.primaryMonitor; - - this._rightPanelBarrier = new Meta.Barrier({ - display: global.display, - x1: primary.x + primary.width, y1: opt.PANEL_POSITION_TOP ? primary.y : primary.y + primary.height - this.panelBox.height, - x2: primary.x + primary.width, y2: opt.PANEL_POSITION_TOP ? primary.y + this.panelBox.height : primary.y + primary.height, - directions: Meta.BarrierDirection.NEGATIVE_X, - }); - } - } -} -- cgit v1.2.3