From 72b4d2a234afb4e7f2d508a11cde95da3a3763d1 Mon Sep 17 00:00:00 2001 From: Marina Zhurakhinskaya Date: Fri, 21 Aug 2009 15:56:07 -0400 Subject: [PATCH] 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 file changed, 11 insertions(+), 11 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index 072a735a6..f477ea0d3 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);