[gnome-shell/workspace-thumbnails: 11/14] Avoid popping the workspace controls in and out at the end of DND
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/workspace-thumbnails: 11/14] Avoid popping the workspace controls in and out at the end of DND
- Date: Thu, 3 Feb 2011 04:50:54 +0000 (UTC)
commit 8e5d613bfa313b9413b17a658fc113e64a17c2ee
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Jan 30 16:38:13 2011 -0500
Avoid popping the workspace controls in and out at the end of DND
At the end of a drag operation, we would invoke the code to slide the
controls in (because we were no longer DND'ing and not hovering) and
then immediately afterwards invoke the code to slide it back out when
we got the ENTER event from the end of DND. While the immediately
overridden tween probably won't have any visible effect it's better
to avoid this, so wait to update the zoom state until BEFORE_REDRAW.
https://bugzilla.gnome.org/show_bug.cgi?id=640996
js/ui/workspacesView.js | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 63f2829..b6e3202 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -3,6 +3,7 @@
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
+const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Signals = imports.signals;
@@ -1060,7 +1061,14 @@ WorkspacesDisplay.prototype = {
_dragEnd: function() {
this._inDrag = false;
- this._updateZoom();
+
+ // We do this deferred because drag-end is emitted before dnd.js emits
+ // event/leave events that were suppressed during the drag. If we didn't
+ // defer this, we'd zoom out then immediately zoom in because of the
+ // enter event we received. That would normally be invisible but we
+ // might as well avoid it.
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
+ Lang.bind(this, this._updateZoom));
}
};
Signals.addSignalMethods(WorkspacesDisplay.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]