LayoutManager: reverse the visibleInFullscreen flag
Change visibleInFullscreen to be trackFullscreen. If true, visibility is fully bound to fullscreen status, if false, no change is made. This allows to avoid set_skip_paint(), while not messing with visibility of actors that are sometimes hidden for other reasons. The flag was reversed because only the panel uses it, so false is a more useful default. https://bugzilla.gnome.org/show_bug.cgi?id=619955
This commit is contained in:
parent
01a1255967
commit
5e865f5bc4
@ -93,7 +93,7 @@ const Key = new Lang.Class({
|
|||||||
this._getExtendedKeys();
|
this._getExtendedKeys();
|
||||||
this.actor._extended_keys = this._extended_keyboard;
|
this.actor._extended_keys = this._extended_keyboard;
|
||||||
this._boxPointer.actor.hide();
|
this._boxPointer.actor.hide();
|
||||||
Main.layoutManager.addChrome(this._boxPointer.actor, { visibleInFullscreen: true });
|
Main.layoutManager.addChrome(this._boxPointer.actor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -35,19 +35,20 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
this.panelBox = new St.BoxLayout({ name: 'panelBox',
|
this.panelBox = new St.BoxLayout({ name: 'panelBox',
|
||||||
vertical: true });
|
vertical: true });
|
||||||
this.addChrome(this.panelBox, { affectsStruts: true });
|
this.addChrome(this.panelBox, { affectsStruts: true,
|
||||||
|
trackFullscreen: true });
|
||||||
this.panelBox.connect('allocation-changed',
|
this.panelBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._updatePanelBarriers));
|
Lang.bind(this, this._updatePanelBarriers));
|
||||||
|
|
||||||
this.trayBox = new St.BoxLayout({ name: 'trayBox' });
|
this.trayBox = new St.BoxLayout({ name: 'trayBox' });
|
||||||
this.addChrome(this.trayBox, { visibleInFullscreen: true });
|
this.addChrome(this.trayBox);
|
||||||
this.trayBox.connect('allocation-changed',
|
this.trayBox.connect('allocation-changed',
|
||||||
Lang.bind(this, this._updateTrayBarrier));
|
Lang.bind(this, this._updateTrayBarrier));
|
||||||
|
|
||||||
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
track_hover: true });
|
track_hover: true });
|
||||||
this.addChrome(this.keyboardBox, { visibleInFullscreen: true });
|
this.addChrome(this.keyboardBox);
|
||||||
this._keyboardHeightNotifyId = 0;
|
this._keyboardHeightNotifyId = 0;
|
||||||
|
|
||||||
global.screen.connect('monitors-changed',
|
global.screen.connect('monitors-changed',
|
||||||
@ -318,8 +319,10 @@ const LayoutManager = new Lang.Class({
|
|||||||
// the window manager struts. Changes to @actor's visibility will
|
// the window manager struts. Changes to @actor's visibility will
|
||||||
// NOT affect whether or not the strut is present, however.
|
// NOT affect whether or not the strut is present, however.
|
||||||
//
|
//
|
||||||
// If %visibleInFullscreen in @params is %true, the actor will be
|
// If %trackFullscreen in @params is %true, the actor's visibility
|
||||||
// visible even when a fullscreen window should be covering it.
|
// will be bound to the presence of fullscreen windows on the same
|
||||||
|
// monitor (it will be hidden whenever a fullscreen window is visible,
|
||||||
|
// and shown otherwise)
|
||||||
addChrome: function(actor, params) {
|
addChrome: function(actor, params) {
|
||||||
this._chrome.addActor(actor, params);
|
this._chrome.addActor(actor, params);
|
||||||
},
|
},
|
||||||
@ -333,10 +336,8 @@ const LayoutManager = new Lang.Class({
|
|||||||
// struts or input region to cover specific children.
|
// struts or input region to cover specific children.
|
||||||
//
|
//
|
||||||
// @params can have any of the same values as in addChrome(),
|
// @params can have any of the same values as in addChrome(),
|
||||||
// though some possibilities don't make sense (eg, trying to have
|
// though some possibilities don't make sense. By default, @actor has
|
||||||
// a %visibleInFullscreen child of a non-%visibleInFullscreen
|
// the same params as its chrome ancestor.
|
||||||
// parent). By default, @actor has the same params as its chrome
|
|
||||||
// ancestor.
|
|
||||||
trackChrome: function(actor, params) {
|
trackChrome: function(actor, params) {
|
||||||
this._chrome.trackActor(actor, params);
|
this._chrome.trackActor(actor, params);
|
||||||
},
|
},
|
||||||
@ -542,7 +543,7 @@ const HotCorner = new Lang.Class({
|
|||||||
// workspace content.
|
// workspace content.
|
||||||
|
|
||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
visibleInFullscreen: false,
|
trackFullscreen: false,
|
||||||
affectsStruts: false,
|
affectsStruts: false,
|
||||||
affectsInputRegion: true
|
affectsInputRegion: true
|
||||||
};
|
};
|
||||||
@ -680,6 +681,9 @@ const Chrome = new Lang.Class({
|
|||||||
|
|
||||||
_updateVisibility: function() {
|
_updateVisibility: function() {
|
||||||
for (let i = 0; i < this._trackedActors.length; i++) {
|
for (let i = 0; i < this._trackedActors.length; i++) {
|
||||||
|
if (!actorData.trackFullscreen)
|
||||||
|
continue;
|
||||||
|
|
||||||
let actorData = this._trackedActors[i], visible;
|
let actorData = this._trackedActors[i], visible;
|
||||||
if (!actorData.isToplevel)
|
if (!actorData.isToplevel)
|
||||||
continue;
|
continue;
|
||||||
@ -688,12 +692,11 @@ const Chrome = new Lang.Class({
|
|||||||
visible = false;
|
visible = false;
|
||||||
else if (this._inOverview)
|
else if (this._inOverview)
|
||||||
visible = true;
|
visible = true;
|
||||||
else if (!actorData.visibleInFullscreen &&
|
else if (this.findMonitorForActor(actorData.actor).inFullscreen)
|
||||||
this.findMonitorForActor(actorData.actor).inFullscreen)
|
|
||||||
visible = false;
|
visible = false;
|
||||||
else
|
else
|
||||||
visible = true;
|
visible = true;
|
||||||
Main.uiGroup.set_skip_paint(actorData.actor, !visible);
|
actorData.actor.visible = visible;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1457,7 +1457,7 @@ const MessageTray = new Lang.Class({
|
|||||||
track_hover: true });
|
track_hover: true });
|
||||||
this._summaryBoxPointer.actor.style_class = 'summary-boxpointer';
|
this._summaryBoxPointer.actor.style_class = 'summary-boxpointer';
|
||||||
this._summaryBoxPointer.actor.hide();
|
this._summaryBoxPointer.actor.hide();
|
||||||
Main.layoutManager.addChrome(this._summaryBoxPointer.actor, { visibleInFullscreen: true });
|
Main.layoutManager.addChrome(this._summaryBoxPointer.actor);
|
||||||
|
|
||||||
this._summaryBoxPointerItem = null;
|
this._summaryBoxPointerItem = null;
|
||||||
this._summaryBoxPointerContentUpdatedId = 0;
|
this._summaryBoxPointerContentUpdatedId = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user