[gnome-shell] workspace: Remove reserved slots
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Remove reserved slots
- Date: Tue, 7 Jul 2020 10:34:22 +0000 (UTC)
commit fa97f7141bb91d9406525f6bd950c57b05734fc2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue Jun 2 21:22:40 2020 -0300
workspace: Remove reserved slots
This is a pre-3.0 feature that was dropped before
the 3.0 release, but managed to find its way until
now, 11 years later.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1352
js/ui/workspace.js | 16 ----------------
js/ui/workspacesView.js | 13 +------------
2 files changed, 1 insertion(+), 28 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index e1b5ea7a8f..e1b9b003ee 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -820,9 +820,6 @@ class Workspace extends St.Widget {
layout_manager: new WorkspaceLayout(metaWorkspace, monitorIndex),
});
- // When dragging a window, we use this slot for reserve space.
- this._reservedSlot = null;
- this._reservedSlotWindow = null;
this.metaWorkspace = metaWorkspace;
this.monitorIndex = monitorIndex;
@@ -878,19 +875,6 @@ class Workspace extends St.Widget {
return this._windows.length == 0;
}
- setReservedSlot(metaWindow) {
- if (this._reservedSlotWindow == metaWindow)
- return;
-
- if (!metaWindow || this.containsMetaWindow(metaWindow)) {
- this._reservedSlotWindow = null;
- this._reservedSlot = null;
- } else {
- this._reservedSlotWindow = metaWindow;
- this._reservedSlot = this._windows[this._lookupIndex(metaWindow)];
- }
- }
-
syncStacking(stackIndices) {
this.layout_manager.syncStacking(stackIndices);
}
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 2792efaad5..af767a4346 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -52,14 +52,12 @@ var WorkspacesViewBase = GObject.registerClass({
}
}
- _dragBegin(overview, window) {
+ _dragBegin() {
this._inDrag = true;
- this._setReservedSlot(window);
}
_dragEnd() {
this._inDrag = false;
- this._setReservedSlot(null);
}
vfunc_allocate(box) {
@@ -132,11 +130,6 @@ class WorkspacesView extends WorkspacesViewBase {
this._updateScrollPosition();
}
- _setReservedSlot(window) {
- for (let i = 0; i < this._workspaces.length; i++)
- this._workspaces[i].setReservedSlot(window);
- }
-
getActiveWorkspace() {
let workspaceManager = global.workspace_manager;
let active = workspaceManager.get_active_workspace_index();
@@ -311,10 +304,6 @@ class ExtraWorkspaceView extends WorkspacesViewBase {
this.add_actor(this._workspace);
}
- _setReservedSlot(window) {
- this._workspace.setReservedSlot(window);
- }
-
getActiveWorkspace() {
return this._workspace;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]