[lightbox] Fix Clutter warning by doing reallocation in a Meta.later_add

Based on an original fix by Maxim Ermilov <zaspire@rambler.ru>

https://bugzilla.gnome.org/show_bug.cgi?id=614905
This commit is contained in:
Colin Walters 2010-04-09 16:43:27 -04:00
parent 58c0abe600
commit a9aa89e858

View File

@ -2,6 +2,7 @@
const Clutter = imports.gi.Clutter; const Clutter = imports.gi.Clutter;
const Lang = imports.lang; const Lang = imports.lang;
const Meta = imports.gi.Meta;
const St = imports.gi.St; const St = imports.gi.St;
/** /**
@ -60,8 +61,13 @@ Lightbox.prototype = {
}, },
_allocationChanged : function(container, box, flags) { _allocationChanged : function(container, box, flags) {
this.actor.width = this._container.width; Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
this.actor.height = this._container.height; this.actor.width = this.width;
this.actor.height = this.height;
return false;
}));
this.width = this._container.width;
this.height = this._container.height;
}, },
_actorAdded : function(container, newChild) { _actorAdded : function(container, newChild) {