[gnome-shell] Make hotCorner a class variable



commit 72b4d2a234afb4e7f2d508a11cde95da3a3763d1
Author: Marina Zhurakhinskaya <marinaz redhat com>
Date:   Fri Aug 21 15:56:07 2009 -0400

    Make hotCorner a class variable
    
    This fixes a bug where we were already using this._hotCorner
    in _onHotCornerEnvironsLeft() and were incorrectly setting
    this._hotCornerEntered to false when the hot corner was
    re-entered from the environs.

 js/ui/panel.js |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 072a735..f477ea0 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -280,10 +280,10 @@ Panel.prototype = {
                                                           opacity: 0,
                                                           reactive: true });
 
-        let hotCorner = new Clutter.Rectangle({ width: 1,
-                                                height: 1,
-                                                opacity: 0,
-                                                reactive: true });
+        this._hotCorner = new Clutter.Rectangle({ width: 1,
+                                                  height: 1,
+                                                  opacity: 0,
+                                                  reactive: true });
 
         this._hotCornerEnvirons.connect('leave-event',
                                         Lang.bind(this, this._onHotCornerEnvironsLeft));
@@ -295,15 +295,15 @@ Panel.prototype = {
         // In addition to being triggered by the mouse enter event, the hot corner
         // can be triggered by clicking on it. This is useful if the user wants to 
         // undo the effect of triggering the hot corner once in the hot corner.
-        hotCorner.connect('enter-event',
-                           Lang.bind(this, this._onHotCornerEntered));
-        hotCorner.connect('button-release-event',
-                           Lang.bind(this, this._onHotCornerClicked));
-        hotCorner.connect('leave-event',
-                          Lang.bind(this, this._onHotCornerLeft));
+        this._hotCorner.connect('enter-event',
+                                Lang.bind(this, this._onHotCornerEntered));
+        this._hotCorner.connect('button-release-event',
+                                Lang.bind(this, this._onHotCornerClicked));
+        this._hotCorner.connect('leave-event',
+                                Lang.bind(this, this._onHotCornerLeft));
 
         this._leftBox.append(this._hotCornerEnvirons, Big.BoxPackFlags.FIXED);
-        this._leftBox.append(hotCorner, Big.BoxPackFlags.FIXED);
+        this._leftBox.append(this._hotCorner, Big.BoxPackFlags.FIXED);
 
         let appMenu = new AppPanelMenu();
         this._leftBox.append(appMenu.actor, Big.BoxPackFlags.NONE);



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