[gnome-games/gsoc-seed-games] [lightsoff] Reorganize order of widget realization; fixes LO on Clutter HEAD
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/gsoc-seed-games] [lightsoff] Reorganize order of widget realization; fixes LO on Clutter HEAD
- Date: Fri, 3 Jul 2009 09:54:45 +0000 (UTC)
commit 8ecdaddc83ae154d2debc9fe0887fc7eef4c29a3
Author: Tim Horton <hortont424 gmail com>
Date: Fri Jul 3 05:40:23 2009 -0400
[lightsoff] Reorganize order of widget realization; fixes LO on Clutter HEAD
I've been chasing after this for two days now, at least, unable to get Lights Off to run.
It turns out that you need to realize the window before the child stage, and both of
these things need to happen before attempting to realize any child ClutterActors.
This means I don't know the size of the window when I'm showing it (yet), so (at least
with xmonad), the window is positioned oddly.
lightsoff/src/main.js.in | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/lightsoff/src/main.js.in b/lightsoff/src/main.js.in
index a66ce22..8831963 100755
--- a/lightsoff/src/main.js.in
+++ b/lightsoff/src/main.js.in
@@ -47,6 +47,11 @@ b.get_object("game_vbox").pack_start(clutter_embed, true, true);
var stage = clutter_embed.get_stage();
stage.color = {alpha:255};
+// TODO: determine size of window before we show it
+// NOTE: show the window before the stage, and the stage before any children
+window.show_all();
+stage.show_all();
+
Settings.theme.map_stuff(stage);
var game = new Game.GameView();
@@ -56,7 +61,4 @@ clutter_embed.set_size_request(stage.width, stage.height);
stage.signal.key_release_event.connect(game.update_keyboard_selection);
-stage.show_all();
-window.show_all();
-
Gtk.main();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]