workspace: Remove slot property of WindowPreview

Since the slot property was only accessed by the old WindowOverlays to
get the position and size of the preview, we can safely stop setting it
and remove that property now.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1307
This commit is contained in:
Jonas Dreßler 2020-06-02 16:23:59 +02:00
parent cadbf7cd8b
commit f4fcba74ff

View File

@ -231,8 +231,6 @@ var WindowPreview = GObject.registerClass({
this._delegate = this; this._delegate = this;
this.slotId = 0; this.slotId = 0;
this._slot = [0, 0, 0, 0];
this._dragSlot = [0, 0, 0, 0];
this._stackAbove = null; this._stackAbove = null;
this._windowContainer.layout_manager.connect( this._windowContainer.layout_manager.connect(
@ -513,17 +511,6 @@ var WindowPreview = GObject.registerClass({
return this.hasAttachedDialogs(); return this.hasAttachedDialogs();
} }
set slot(slot) {
this._slot = slot;
}
get slot() {
if (this.inDrag)
return this._dragSlot;
else
return this._slot;
}
deleteAll() { deleteAll() {
const windows = this._windowContainer.layout_manager.getWindows(); const windows = this._windowContainer.layout_manager.getWindows();
@ -732,7 +719,6 @@ var WindowPreview = GObject.registerClass({
} }
_onDragBegin(_draggable, _time) { _onDragBegin(_draggable, _time) {
this._dragSlot = this._slot;
this.inDrag = true; this.inDrag = true;
this.hideOverlay(false); this.hideOverlay(false);
this.emit('drag-begin'); this.emit('drag-begin');
@ -1362,7 +1348,6 @@ class Workspace extends St.Widget {
const cloneWidth = cellWidth; const cloneWidth = cellWidth;
const cloneHeight = cellHeight; const cloneHeight = cellHeight;
clone.slot = [x, y, cloneWidth, cloneHeight];
if (!clone.positioned) { if (!clone.positioned) {
// This window appeared after the overview was already up // This window appeared after the overview was already up
@ -1559,7 +1544,6 @@ class Workspace extends St.Widget {
const height = win._overviewHint.height; const height = win._overviewHint.height;
delete win._overviewHint; delete win._overviewHint;
clone.slot = [x, y, width, height];
clone.positioned = true; clone.positioned = true;
clone.set_position(x, y); clone.set_position(x, y);