Revert "workspacesView: Avoid setting invalid geometries on views"
This reverts commit 67b9386b4b
.
For not yet known reasons this caused a regression on the stable branch. Further
more it appears not to be needed, as no work depending on it has been backported
so far.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2971
This commit is contained in:
parent
8f6c64f607
commit
2bf544e272
@ -450,7 +450,6 @@ class WorkspacesDisplay extends St.Widget {
|
|||||||
this._keyPressEventId = 0;
|
this._keyPressEventId = 0;
|
||||||
this._scrollTimeoutId = 0;
|
this._scrollTimeoutId = 0;
|
||||||
|
|
||||||
this._actualGeometry = null;
|
|
||||||
this._fullGeometry = null;
|
this._fullGeometry = null;
|
||||||
this._inWindowDrag = false;
|
this._inWindowDrag = false;
|
||||||
|
|
||||||
@ -691,10 +690,8 @@ class WorkspacesDisplay extends St.Widget {
|
|||||||
|
|
||||||
this._workspacesViews.forEach(v => v.show());
|
this._workspacesViews.forEach(v => v.show());
|
||||||
|
|
||||||
if (this._fullGeometry)
|
this._updateWorkspacesFullGeometry();
|
||||||
this._syncWorkspacesFullGeometry();
|
this._updateWorkspacesActualGeometry();
|
||||||
if (this._actualGeometry)
|
|
||||||
this._syncWorkspacesActualGeometry();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_getMonitorIndexForEvent(event) {
|
_getMonitorIndexForEvent(event) {
|
||||||
@ -746,10 +743,10 @@ class WorkspacesDisplay extends St.Widget {
|
|||||||
// the sliding controls were never slid in at all.
|
// the sliding controls were never slid in at all.
|
||||||
setWorkspacesFullGeometry(geom) {
|
setWorkspacesFullGeometry(geom) {
|
||||||
this._fullGeometry = geom;
|
this._fullGeometry = geom;
|
||||||
this._syncWorkspacesFullGeometry();
|
this._updateWorkspacesFullGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
_syncWorkspacesFullGeometry() {
|
_updateWorkspacesFullGeometry() {
|
||||||
if (!this._workspacesViews.length)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -761,21 +758,18 @@ class WorkspacesDisplay extends St.Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateWorkspacesActualGeometry() {
|
_updateWorkspacesActualGeometry() {
|
||||||
const [x, y] = this.get_transformed_position();
|
|
||||||
const width = this.allocation.get_width();
|
|
||||||
const height = this.allocation.get_height();
|
|
||||||
|
|
||||||
this._actualGeometry = { x, y, width, height };
|
|
||||||
this._syncWorkspacesActualGeometry();
|
|
||||||
}
|
|
||||||
|
|
||||||
_syncWorkspacesActualGeometry() {
|
|
||||||
if (!this._workspacesViews.length)
|
if (!this._workspacesViews.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
let [x, y] = this.get_transformed_position();
|
||||||
|
let allocation = this.allocation;
|
||||||
|
let width = allocation.x2 - allocation.x1;
|
||||||
|
let height = allocation.y2 - allocation.y1;
|
||||||
|
let primaryGeometry = { x, y, width, height };
|
||||||
|
|
||||||
let monitors = Main.layoutManager.monitors;
|
let monitors = Main.layoutManager.monitors;
|
||||||
for (let i = 0; i < monitors.length; i++) {
|
for (let i = 0; i < monitors.length; i++) {
|
||||||
let geometry = i === this._primaryIndex ? this._actualGeometry : monitors[i];
|
let geometry = i == this._primaryIndex ? primaryGeometry : monitors[i];
|
||||||
this._workspacesViews[i].setActualGeometry(geometry);
|
this._workspacesViews[i].setActualGeometry(geometry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user