Enable hot corner for triggering the overview mode
Use the 1x1 actor in the top left corner of the screen to enter and leave the overview mode by just moving the mouse over to it. No delay is used for triggering the hot corner because a delay significant enough to allow moving away the mouse to avoid triggering it ruins the desired flow when triggering the hot corner is actually intended. The hot corner is not enabled in the full screen mode because the application or the virtual system might have a hot corner of its own in that place.
This commit is contained in:
parent
4e23f4cfc9
commit
ccafa53bd6
@ -76,6 +76,22 @@ Panel.prototype = {
|
|||||||
|
|
||||||
box.append(this.button.button, Big.BoxPackFlags.NONE);
|
box.append(this.button.button, Big.BoxPackFlags.NONE);
|
||||||
|
|
||||||
|
let hotCorner = new Clutter.Rectangle({ width: 1,
|
||||||
|
height: 1,
|
||||||
|
opacity: 0,
|
||||||
|
reactive: true });
|
||||||
|
|
||||||
|
// 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
|
||||||
|
// immediately undo the effect of triggering the hot corner once in the
|
||||||
|
// hot corner.
|
||||||
|
hotCorner.connect('enter-event',
|
||||||
|
Lang.bind(this, this._onHotCornerTriggered));
|
||||||
|
hotCorner.connect('button-release-event',
|
||||||
|
Lang.bind(this, this._onHotCornerTriggered));
|
||||||
|
|
||||||
|
box.add_actor(hotCorner);
|
||||||
|
|
||||||
let statusbox = new Big.Box();
|
let statusbox = new Big.Box();
|
||||||
let statusmenu = this._statusmenu = new Shell.StatusMenu();
|
let statusmenu = this._statusmenu = new Shell.StatusMenu();
|
||||||
statusmenu.get_icon().hide();
|
statusmenu.get_icon().hide();
|
||||||
@ -201,5 +217,10 @@ Panel.prototype = {
|
|||||||
this._clock.set_text(displayDate.toLocaleFormat("%a %l:%M %p"));
|
this._clock.set_text(displayDate.toLocaleFormat("%a %l:%M %p"));
|
||||||
Mainloop.timeout_add(msecRemaining, Lang.bind(this, this._updateClock));
|
Mainloop.timeout_add(msecRemaining, Lang.bind(this, this._updateClock));
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onHotCornerTriggered : function() {
|
||||||
|
Main.overlay.toggle();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user