Skip to content

Commit c7ecb6d

Browse files
committed
Restore set_skip_paint method for the uiGroup.
Setting visibility in _updateVisibility requires a bit more accounting than we currently do, and it's simpler to add the functionality to UiActor and avoid changing visible states.
1 parent 1deb0ff commit c7ecb6d

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

js/ui/layout.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ Monitor.prototype = {
5454

5555
const UiActor = GObject.registerClass(
5656
class UiActor extends St.Widget {
57+
_init() {
58+
super._init();
59+
this.skip_paint_actors = new Set();
60+
}
61+
62+
set_skip_paint(child, skip) {
63+
if (skip) {
64+
this.skip_paint_actors.add(child);
65+
} else {
66+
this.skip_paint_actors.delete(child);
67+
}
68+
}
69+
5770
vfunc_get_preferred_width(_forHeight) {
5871
let width = global.stage.width;
5972
return [width, width];
@@ -63,6 +76,14 @@ class UiActor extends St.Widget {
6376
let height = global.stage.height;
6477
return [height, height];
6578
}
79+
80+
vfunc_paint(context) {
81+
for (let child = this.get_first_child(); child != null; child = child.get_next_sibling()) {
82+
if (this.skip_paint_actors.has(child))
83+
continue;
84+
child.paint(context);
85+
}
86+
}
6687
});
6788

6889
/**
@@ -608,7 +629,7 @@ Chrome.prototype = {
608629
visible = false;
609630
else
610631
visible = true;
611-
actorData.actor.visible = visible;
632+
Main.uiGroup.set_skip_paint(actorData.actor, !visible);
612633
}
613634
this._queueUpdateRegions();
614635
},

0 commit comments

Comments
 (0)