summaryrefslogtreecommitdiffstats
path: root/extensions/45/vertical-workspaces/lib/layout.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/45/vertical-workspaces/lib/layout.js')
-rw-r--r--extensions/45/vertical-workspaces/lib/layout.js82
1 files changed, 52 insertions, 30 deletions
diff --git a/extensions/45/vertical-workspaces/lib/layout.js b/extensions/45/vertical-workspaces/lib/layout.js
index d8f8fdc..807f9e0 100644
--- a/extensions/45/vertical-workspaces/lib/layout.js
+++ b/extensions/45/vertical-workspaces/lib/layout.js
@@ -3,7 +3,7 @@
* layout.js
*
* @author GdH <G-dH@github.com>
- * @copyright 2022 - 2023
+ * @copyright 2022 - 2024
* @license GPL-3.0
*
*/
@@ -127,23 +127,30 @@ const LayoutManagerCommon = {
return;
if (this.panelBox.height) {
+ const backend = !!Meta.Barrier.prototype.backend;
+ let params = {};
+ if (backend)
+ params['backend'] = global.backend;
+ else
+ params['display'] = global.display;
+
let primary = this.primaryMonitor;
if ([0, 1, 3].includes(opt.HOT_CORNER_POSITION)) {
- this._rightPanelBarrier = new Meta.Barrier({
- display: global.display,
+ params = Object.assign({}, params, {
x1: primary.x + primary.width, y1: this.panelBox.allocation.y1,
x2: primary.x + primary.width, y2: this.panelBox.allocation.y2,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
+ this._rightPanelBarrier = new Meta.Barrier(params);
}
if ([2, 4].includes(opt.HOT_CORNER_POSITION)) {
- this._leftPanelBarrier = new Meta.Barrier({
- display: global.display,
+ params = Object.assign({}, params, {
x1: primary.x, y1: this.panelBox.allocation.y1,
x2: primary.x, y2: this.panelBox.allocation.y2,
directions: Meta.BarrierDirection.POSITIVE_X,
});
+ this._leftPanelBarrier = new Meta.Barrier(params);
}
}
},
@@ -276,50 +283,65 @@ const HotCornerCommon = {
const extendV = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && opt.DASH_VERTICAL && monitor.index === primaryMonitor;
const extendH = opt && opt.HOT_CORNER_ACTION && opt.HOT_CORNER_EDGE && !opt.DASH_VERTICAL && monitor.index === primaryMonitor;
+ const backend = !!Meta.Barrier.prototype.backend;
+ let params = {};
+ if (backend)
+ params['backend'] = global.backend;
+ else
+ params['display'] = global.display;
+
if (opt.HOT_CORNER_POSITION <= 1) {
- this._verticalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x, y1: this._y, y2: this._y + (extendV ? monitor.height : size),
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x,
+ y1: this._y, y2: this._y + (extendV ? monitor.height : size),
directions: Meta.BarrierDirection.POSITIVE_X,
});
- this._horizontalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x + (extendH ? monitor.width : size), y1: this._y, y2: this._y,
+ this._verticalBarrier = new Meta.Barrier(params);
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x + (extendH ? monitor.width : size),
+ y1: this._y, y2: this._y,
directions: Meta.BarrierDirection.POSITIVE_Y,
});
+ this._horizontalBarrier = new Meta.Barrier(params);
} else if (opt.HOT_CORNER_POSITION === 2) {
- this._verticalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x, y1: this._y, y2: this._y + (extendV ? monitor.height : size),
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x,
+ y1: this._y, y2: this._y + (extendV ? monitor.height : size),
directions: Meta.BarrierDirection.NEGATIVE_X,
});
- this._horizontalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x - size, x2: this._x, y1: this._y, y2: this._y,
+ this._verticalBarrier = new Meta.Barrier(params);
+ params = Object.assign({}, params, {
+ x1: this._x - size, x2: this._x,
+ y1: this._y, y2: this._y,
directions: Meta.BarrierDirection.POSITIVE_Y,
});
+ this._horizontalBarrier = new Meta.Barrier(params);
} else if (opt.HOT_CORNER_POSITION === 3) {
- this._verticalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x, y1: this._y, y2: this._y - size,
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x,
+ y1: this._y, y2: this._y - size,
directions: Meta.BarrierDirection.POSITIVE_X,
});
- this._horizontalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x + (extendH ? monitor.width : size), y1: this._y, y2: this._y,
+ this._verticalBarrier = new Meta.Barrier(params);
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x + (extendH ? monitor.width : size),
+ y1: this._y, y2: this._y,
directions: Meta.BarrierDirection.NEGATIVE_Y,
});
+ this._horizontalBarrier = new Meta.Barrier(params);
} else if (opt.HOT_CORNER_POSITION === 4) {
- this._verticalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x, y1: this._y, y2: this._y - size,
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x,
+ y1: this._y, y2: this._y - size,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
- this._horizontalBarrier = new Meta.Barrier({
- display: global.display,
- x1: this._x, x2: this._x - size, y1: this._y, y2: this._y,
+ this._verticalBarrier = new Meta.Barrier(params);
+ params = Object.assign({}, params, {
+ x1: this._x, x2: this._x - size,
+ y1: this._y, y2: this._y,
directions: Meta.BarrierDirection.NEGATIVE_Y,
});
+ this._horizontalBarrier = new Meta.Barrier(params);
}
this._pressureBarrier.addBarrier(this._verticalBarrier);
@@ -431,7 +453,7 @@ const HotCornerCommon = {
},
_toggleWindowSearchProvider() {
- if (!Main.overview._overview._controls._searchController._searchActive) {
+ if (!Main.overview.searchController._searchActive) {
opt.OVERVIEW_MODE = 2;
opt.OVERVIEW_MODE2 = true;
opt.WORKSPACE_MODE = 0;