From 911387bc4925f33cff6ade875b39e7752ccf4776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 19 Jun 2024 13:01:37 +0200 Subject: [PATCH] window-list: Rename XDND related methods and props The window list buttons themselves will become draggable, so include "xdnd" in the existing drag handling to disambiguate it. Part-of: --- extensions/window-list/extension.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 21823cf8..d765f58f 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -866,12 +866,12 @@ class WindowList extends St.Widget { 'window-created', (dsp, win) => this._addWindow(win, true), this); Main.xdndHandler.connectObject( - 'drag-begin', () => this._monitorDrag(), - 'drag-end', () => this._stopMonitoringDrag(), + 'drag-begin', () => this._monitorXdndDrag(), + 'drag-end', () => this._stopMonitoringXdndDrag(), this); - this._dragMonitor = { - dragMotion: this._onDragMotion.bind(this), + this._xdndDragMonitor = { + dragMotion: this._onXdndDragMotion.bind(this), }; this._dndTimeoutId = 0; @@ -1059,16 +1059,16 @@ class WindowList extends St.Widget { child?.animateOutAndDestroy(); } - _monitorDrag() { - DND.addDragMonitor(this._dragMonitor); + _monitorXdndDrag() { + DND.addDragMonitor(this._xdndDragMonitor); } - _stopMonitoringDrag() { - DND.removeDragMonitor(this._dragMonitor); + _stopMonitoringXdndDrag() { + DND.removeDragMonitor(this._xdndDragMonitor); this._removeActivateTimeout(); } - _onDragMotion(dragEvent) { + _onXdndDragMotion(dragEvent) { if (Main.overview.visible || !this.contains(dragEvent.targetActor)) { this._removeActivateTimeout(); @@ -1116,7 +1116,7 @@ class WindowList extends St.Widget { this._windowSignals.forEach((id, win) => win.disconnect(id)); this._windowSignals.clear(); - this._stopMonitoringDrag(); + this._stopMonitoringXdndDrag(); this._settings.disconnectObject(); this._settings = null;