[gnome-shell] [lightbox] Fix Clutter warning by doing reallocation in a Meta.later_add
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [lightbox] Fix Clutter warning by doing reallocation in a Meta.later_add
- Date: Fri, 9 Apr 2010 20:46:36 +0000 (UTC)
commit a9aa89e858ab9bc439e7a7e63cd794bfa5925ef7
Author: Colin Walters <walters verbum org>
Date: Fri Apr 9 16:43:27 2010 -0400
[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
js/ui/lightbox.js | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/lightbox.js b/js/ui/lightbox.js
index e2c1a98..298a656 100644
--- a/js/ui/lightbox.js
+++ b/js/ui/lightbox.js
@@ -2,6 +2,7 @@
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
+const Meta = imports.gi.Meta;
const St = imports.gi.St;
/**
@@ -60,8 +61,13 @@ Lightbox.prototype = {
},
_allocationChanged : function(container, box, flags) {
- this.actor.width = this._container.width;
- this.actor.height = this._container.height;
+ Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
+ 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]