Skip to content

Commit 6ff0149

Browse files
committed
startupAnimation.js: Make sure the shroud actor remains the size
of the stage during startup. As a virtual machine guest, the 'monitor' may be resized after the shroud actor is set up, but before (or during) the animation itself, causing the shroud to only cover a portion of the screen. The constraints will make sure the shroud resizes if the stage does at any point during startup.
1 parent 7a8fb6c commit 6ff0149

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

js/ui/startupAnimation.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ Animation.prototype = {
3232

3333
prepare: function() {
3434
try {
35-
this.shroud = new Clutter.Actor({ width: global.screen_width,
36-
height: global.screen_height,
37-
reactive: false,
38-
background_color: new Clutter.Color( { red: 0, green: 0, blue: 0, alpha: 255} )
39-
});
35+
this.shroud = new Clutter.Actor({
36+
reactive: false,
37+
background_color: new Clutter.Color( { red: 0, green: 0, blue: 0, alpha: 255} )
38+
});
39+
40+
let constraint = new Clutter.BindConstraint({ source: global.stage, coordinate: Clutter.BindCoordinate.ALL });
41+
this.shroud.add_constraint(constraint);
42+
4043
Main.layoutManager.addChrome(this.shroud);
4144

4245
let icon_size = 128 * global.ui_scale;

0 commit comments

Comments
 (0)