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
This commit is contained in:
Stefano Facchini 2012-02-11 11:14:43 +01:00
parent 245c58842b
commit eab4f4c963
2 changed files with 8 additions and 2 deletions

View File

@ -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() {

View File

@ -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() {