[sushi] mainwindow: cleanup window realization



commit 3b662f08ab120757c1f59cf665aa93d96613b745
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Jul 2 00:34:59 2011 -0400

    mainwindow: cleanup window realization

 src/js/ui/mainWindow.js |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index d5a95f6..774cd3c 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -73,6 +73,9 @@ MainWindow.prototype = {
 
         this._titleGroup =  new Clutter.Group();
         this._stage.add_actor(this._titleGroup);
+
+        this._mainGroup.set_opacity(0);
+        this._titleGroup.set_opacity(0);
     },
 
     _connectStageSignals : function() {
@@ -609,17 +612,9 @@ MainWindow.prototype = {
      **************************************************************************/
     setParent : function(xid) {
         this._parent = Sushi.create_foreign_window(xid);
-
-        if (!this._gtkWindow.get_realized()) {
-            this._gtkWindow.realize();
-            this._gtkWindow.get_window().set_transient_for(this._parent);
-
-            /* FIXME: I don't know why I need to call this before
-             * drawing the background.
-             */
-            this._gtkWindow.show_all();
-            this._gtkWindow.hide();
-        }
+        this._gtkWindow.realize();
+        this._gtkWindow.get_window().set_transient_for(this._parent);
+        this._gtkWindow.show_all();
     },
 
     setFile : function(file) {
@@ -630,8 +625,7 @@ MainWindow.prototype = {
         this._createToolbar();
         this._createTitle();
 
-        if (!this._gtkWindow.get_visible())
-            this._fadeInWindow();
+        this._fadeInWindow();
     },
 
     setTitle : function(label) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]