[gnome-shell] workspaceThumbnail: forbid manipulations of removed workspaces
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnail: forbid manipulations of removed workspaces
- Date: Sun, 20 Feb 2011 17:40:13 +0000 (UTC)
commit 45fe44da85b8fe199d82bf5dd3d12bdc164a81cd
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Feb 14 17:09:04 2011 -0500
workspaceThumbnail: forbid manipulations of removed workspaces
Don't allow dragging onto a removed workspace or activating it.
https://bugzilla.gnome.org/show_bug.cgi?id=642329
js/ui/workspaceThumbnail.js | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 6d44e23..ab9ea90 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -328,6 +328,9 @@ WorkspaceThumbnail.prototype = {
},
_activate : function (clone, time) {
+ if (this.state > ThumbnailState.NORMAL)
+ return;
+
// a click on the already current workspace should go back to the main view
if (this.metaWorkspace == global.screen.get_active_workspace())
Main.overview.hide();
@@ -337,6 +340,9 @@ WorkspaceThumbnail.prototype = {
// Draggable target interface
handleDragOver : function(source, actor, x, y, time) {
+ if (this.state > ThumbnailState.NORMAL)
+ return DND.DragMotionResult.CONTINUE;
+
if (source.realWindow)
return DND.DragMotionResult.MOVE_DROP;
if (source.shellWorkspaceLaunch)
@@ -346,6 +352,9 @@ WorkspaceThumbnail.prototype = {
},
acceptDrop : function(source, actor, x, y, time) {
+ if (this.state > ThumbnailState.NORMAL)
+ return false;
+
if (source.realWindow) {
let win = source.realWindow;
if (this._isMyWindow(win))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]