[gnome-shell] XDND: Fix dragMonitor leak in WorkspacesDisplay
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] XDND: Fix dragMonitor leak in WorkspacesDisplay
- Date: Mon, 14 Mar 2011 21:03:23 +0000 (UTC)
commit 29d473f2faa03d50537f87d419092840fe79057d
Author: Adel Gadllah <adel gadllah gmail com>
Date: Sun Mar 13 19:34:47 2011 +0100
XDND: Fix dragMonitor leak in WorkspacesDisplay
WorkspacesDisplay removes its dragMonitor in _dragEnd, but
this was never called in when a xdnd drag ended causing
dragMonitors to stack up and handling events multiple times.
Fix that by making sure that _dragEnd is called when xdnd ends.
https://bugzilla.gnome.org/show_bug.cgi?id=644642
js/ui/overview.js | 1 +
js/ui/workspacesView.js | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index b6c30d9..18f0c0f 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -220,6 +220,7 @@ Overview.prototype = {
this._resetWindowSwitchTimeout();
this._lastHoveredWindow = null;
DND.removeMonitor(this._dragMonitor);
+ this.endItemDrag();
},
_resetWindowSwitchTimeout: function() {
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c2502ef..3f79ec8 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -320,6 +320,9 @@ WorkspacesView.prototype = {
Main.overview.disconnect(this._overviewShownId);
global.window_manager.disconnect(this._switchWorkspaceNotifyId);
+ if (this._inDrag)
+ this._dragEnd();
+
if (this._timeoutId) {
Mainloop.source_remove(this._timeoutId);
this._timeoutId = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]