[gnome-shell] Return expected type from handleDragOver for Activities button actors
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Return expected type from handleDragOver for Activities button actors
- Date: Sun, 12 Feb 2012 19:27:20 +0000 (UTC)
commit eab4f4c963ffa5fb73aa1ec1ee9a5e859133be79
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sat Feb 11 11:14:43 2012 +0100
Return expected type from handleDragOver for Activities button actors
Currently they return 'undefined' instead of something meaningful,
e.g. DND.DragMotionResult.CONTINUE. This was unnoticed because none
of the ancestors of the Activities button actors do any drag handling.
The only visible issue are JS errors generated when dragging, for example,
a window thumbnail over the button, because the cursor cannot be set.
https://bugzilla.gnome.org/show_bug.cgi?id=669921
js/ui/layout.js | 5 ++++-
js/ui/panel.js | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index fb808ec..ae6ceb3 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -8,6 +8,7 @@ const Shell = imports.gi.Shell;
const Signals = imports.signals;
const St = imports.gi.St;
+const DND = imports.ui.dnd;
const Main = imports.ui.main;
const Params = imports.misc.params;
const ScreenSaver = imports.misc.screenSaver;
@@ -490,13 +491,15 @@ const HotCorner = new Lang.Class({
handleDragOver: function(source, actor, x, y, time) {
if (source != Main.xdndHandler)
- return;
+ return DND.DragMotionResult.CONTINUE;
if (!Main.overview.visible && !Main.overview.animationInProgress) {
this.rippleAnimation();
Main.overview.showTemporarily();
Main.overview.beginItemDrag(actor);
}
+
+ return DND.DragMotionResult.CONTINUE;
},
_onCornerEntered : function() {
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 25f27be..088719a 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -13,6 +13,7 @@ const Signals = imports.signals;
const Config = imports.misc.config;
const CtrlAltTab = imports.ui.ctrlAltTab;
+const DND = imports.ui.dnd;
const Layout = imports.ui.layout;
const Overview = imports.ui.overview;
const PopupMenu = imports.ui.popupMenu;
@@ -660,12 +661,14 @@ const ActivitiesButton = new Lang.Class({
handleDragOver: function(source, actor, x, y, time) {
if (source != Main.xdndHandler)
- return;
+ return DND.DragMotionResult.CONTINUE;
if (this._xdndTimeOut != 0)
Mainloop.source_remove(this._xdndTimeOut);
this._xdndTimeOut = Mainloop.timeout_add(BUTTON_DND_ACTIVATION_TIMEOUT,
Lang.bind(this, this._xdndShowOverview, actor));
+
+ return DND.DragMotionResult.CONTINUE;
},
_escapeMenuGrab: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]