layout: Add back affectsInputRegion
It was removed as actors that should not affect the input
region can simply be added to the uiGroup instead. However
the property is useful to add non-reactive chrome, but then
use trackChrome() to add a child to the input region.
This reverts commit e62d22a50e
.
https://bugzilla.gnome.org/show_bug.cgi?id=744850
This commit is contained in:
parent
faf00036e2
commit
aedc2428be
@ -165,6 +165,7 @@ const Monitor = new Lang.Class({
|
|||||||
const defaultParams = {
|
const defaultParams = {
|
||||||
trackFullscreen: false,
|
trackFullscreen: false,
|
||||||
affectsStruts: false,
|
affectsStruts: false,
|
||||||
|
affectsInputRegion: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const LayoutManager = new Lang.Class({
|
const LayoutManager = new Lang.Class({
|
||||||
@ -736,10 +737,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
// @actor: an actor to add to the chrome
|
// @actor: an actor to add to the chrome
|
||||||
// @params: (optional) additional params
|
// @params: (optional) additional params
|
||||||
//
|
//
|
||||||
// Adds @actor to the chrome, and extends the input region
|
// Adds @actor to the chrome, and (unless %affectsInputRegion in
|
||||||
// to include it. Changes in @actor's size, position, and
|
// @params is %false) extends the input region to include it.
|
||||||
// visibility will automatically result in appropriate changes
|
// Changes in @actor's size, position, and visibility will
|
||||||
// to the input region.
|
// automatically result in appropriate changes to the input
|
||||||
|
// region.
|
||||||
//
|
//
|
||||||
// If %affectsStruts in @params is %true (and @actor is along a
|
// If %affectsStruts in @params is %true (and @actor is along a
|
||||||
// screen edge), then @actor's size and position will also affect
|
// screen edge), then @actor's size and position will also affect
|
||||||
@ -941,7 +943,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
|
|
||||||
for (i = 0; i < this._trackedActors.length; i++) {
|
for (i = 0; i < this._trackedActors.length; i++) {
|
||||||
let actorData = this._trackedActors[i];
|
let actorData = this._trackedActors[i];
|
||||||
if (!wantsInputRegion && !actorData.affectsStruts)
|
if (!(actorData.affectsInputRegion && wantsInputRegion) && !actorData.affectsStruts)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
let [x, y] = actorData.actor.get_transformed_position();
|
let [x, y] = actorData.actor.get_transformed_position();
|
||||||
@ -951,7 +953,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
w = Math.round(w);
|
w = Math.round(w);
|
||||||
h = Math.round(h);
|
h = Math.round(h);
|
||||||
|
|
||||||
if (wantsInputRegion && actorData.actor.get_paint_visibility())
|
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
|
||||||
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
|
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
|
||||||
|
|
||||||
if (actorData.affectsStruts) {
|
if (actorData.affectsStruts) {
|
||||||
|
Loading…
Reference in New Issue
Block a user