layout: Disable the overview hotcorner when we have a full-screen window open

For the same reasons that we disable the tray barrier, we should
disable hot corners as well -- when users have a full-screen game
open, we shouldn't allow overview activation by the hotcorner.

https://bugzilla.gnome.org/show_bug.cgi?id=694997
This commit is contained in:
Jasper St. Pierre 2013-03-09 21:12:37 -05:00
parent 73fa4b1cbd
commit 29152d3022

View File

@ -326,7 +326,7 @@ const LayoutManager = new Lang.Class({
continue; continue;
} }
let corner = new HotCorner(this, cornerX, cornerY); let corner = new HotCorner(this, monitor, cornerX, cornerY);
corner.setBarrierSize(size); corner.setBarrierSize(size);
this.hotCorners.push(corner); this.hotCorners.push(corner);
} }
@ -1107,13 +1107,15 @@ Signals.addSignalMethods(LayoutManager.prototype);
const HotCorner = new Lang.Class({ const HotCorner = new Lang.Class({
Name: 'HotCorner', Name: 'HotCorner',
_init : function(layoutManager, x, y) { _init : function(layoutManager, monitor, x, y) {
// We use this flag to mark the case where the user has entered the // We use this flag to mark the case where the user has entered the
// hot corner and has not left both the hot corner and a surrounding // hot corner and has not left both the hot corner and a surrounding
// guard area (the "environs"). This avoids triggering the hot corner // guard area (the "environs"). This avoids triggering the hot corner
// multiple times due to an accidental jitter. // multiple times due to an accidental jitter.
this._entered = false; this._entered = false;
this._monitor = monitor;
this._x = x; this._x = x;
this._y = y; this._y = y;
@ -1247,6 +1249,9 @@ const HotCorner = new Lang.Class({
}, },
_toggleOverview: function() { _toggleOverview: function() {
if (this._monitor.inFullscreen)
return;
if (Main.overview.shouldToggleByCornerOrButton()) { if (Main.overview.shouldToggleByCornerOrButton()) {
this._rippleAnimation(); this._rippleAnimation();
Main.overview.toggle(); Main.overview.toggle();