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.
This commit is contained in:
Marina Zhurakhinskaya 2009-08-21 15:56:07 -04:00
parent 02e438b1f8
commit 72b4d2a234

View File

@ -280,10 +280,10 @@ Panel.prototype = {
opacity: 0, opacity: 0,
reactive: true }); reactive: true });
let hotCorner = new Clutter.Rectangle({ width: 1, this._hotCorner = new Clutter.Rectangle({ width: 1,
height: 1, height: 1,
opacity: 0, opacity: 0,
reactive: true }); reactive: true });
this._hotCornerEnvirons.connect('leave-event', this._hotCornerEnvirons.connect('leave-event',
Lang.bind(this, this._onHotCornerEnvironsLeft)); Lang.bind(this, this._onHotCornerEnvironsLeft));
@ -295,15 +295,15 @@ Panel.prototype = {
// In addition to being triggered by the mouse enter event, the hot corner // 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 // 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. // undo the effect of triggering the hot corner once in the hot corner.
hotCorner.connect('enter-event', this._hotCorner.connect('enter-event',
Lang.bind(this, this._onHotCornerEntered)); Lang.bind(this, this._onHotCornerEntered));
hotCorner.connect('button-release-event', this._hotCorner.connect('button-release-event',
Lang.bind(this, this._onHotCornerClicked)); Lang.bind(this, this._onHotCornerClicked));
hotCorner.connect('leave-event', this._hotCorner.connect('leave-event',
Lang.bind(this, this._onHotCornerLeft)); Lang.bind(this, this._onHotCornerLeft));
this._leftBox.append(this._hotCornerEnvirons, Big.BoxPackFlags.FIXED); 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(); let appMenu = new AppPanelMenu();
this._leftBox.append(appMenu.actor, Big.BoxPackFlags.NONE); this._leftBox.append(appMenu.actor, Big.BoxPackFlags.NONE);