[gnome-shell/gnome-3-8] overview: Don't allow exiting the overview if we have a DND drag



commit c4f744d7ecbf47222bea492e29932556cbcdd104
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Mar 27 13:31:43 2013 -0400

    overview: Don't allow exiting the overview if we have a DND drag
    
    Otherwise, people can drag app icons or window thumbnails out of
    the overview, and it just looks weird.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698484

 js/ui/overview.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 6f4b83b..02b23c7 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -461,6 +461,7 @@ const Overview = new Lang.Class({
 
     beginItemDrag: function(source) {
         this.emit('item-drag-begin');
+        this._inDrag = true;
     },
 
     cancelledItemDrag: function(source) {
@@ -469,10 +470,12 @@ const Overview = new Lang.Class({
 
     endItemDrag: function(source) {
         this.emit('item-drag-end');
+        this._inDrag = false;
     },
 
     beginWindowDrag: function(source) {
         this.emit('window-drag-begin');
+        this._inDrag = true;
     },
 
     cancelledWindowDrag: function(source) {
@@ -481,6 +484,7 @@ const Overview = new Lang.Class({
 
     endWindowDrag: function(source) {
         this.emit('window-drag-end');
+        this._inDrag = false;
     },
 
     // show:
@@ -609,6 +613,8 @@ const Overview = new Lang.Class({
     shouldToggleByCornerOrButton: function() {
         if (this.animationInProgress)
             return false;
+        if (this._inDrag)
+            return false;
         if (this._activationTime == 0 || Date.now() / 1000 - this._activationTime > 
OVERVIEW_ACTIVATION_TIMEOUT)
             return true;
         return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]