layout: Restructure input region and struts code
Have two branches, one for input region and one for struts. This makes it easier to skip one of the branches, like in the case where we want to skip input regions if we have a popup menu visible. https://bugzilla.gnome.org/show_bug.cgi?id=633620
This commit is contained in:
parent
978ac65cae
commit
a4e70ba4ca
@ -830,16 +830,16 @@ const LayoutManager = new Lang.Class({
|
||||
y = Math.round(y);
|
||||
w = Math.round(w);
|
||||
h = Math.round(h);
|
||||
|
||||
if (actorData.affectsInputRegion) {
|
||||
let rect = new Meta.Rectangle({ x: x, y: y, width: w, height: h});
|
||||
|
||||
if (actorData.affectsInputRegion &&
|
||||
actorData.actor.get_paint_visibility() &&
|
||||
if (actorData.actor.get_paint_visibility() &&
|
||||
!this.uiGroup.get_skip_paint(actorData.actor))
|
||||
rects.push(rect);
|
||||
}
|
||||
|
||||
if (!actorData.affectsStruts)
|
||||
continue;
|
||||
|
||||
if (actorData.affectsStruts) {
|
||||
// Limit struts to the size of the screen
|
||||
let x1 = Math.max(x, 0);
|
||||
let x2 = Math.min(x + w, global.screen_width);
|
||||
@ -911,6 +911,7 @@ const LayoutManager = new Lang.Class({
|
||||
let strut = new Meta.Strut({ rect: strutRect, side: side });
|
||||
struts.push(strut);
|
||||
}
|
||||
}
|
||||
|
||||
global.set_stage_input_region(rects);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user