[sushi] utils: realize main window unconditionally



commit 4a1648fee308ba74ef312d7708bf4bb21aba2c8b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Jul 10 18:00:41 2019 +0200

    utils: realize main window unconditionally
    
    Not only when we can create an ExternalWindow instance. There are
    expectations in mainWindow.js that the window is already realized when
    the renderer is ready.

 src/libsushi/sushi-utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/libsushi/sushi-utils.c b/src/libsushi/sushi-utils.c
index e215846..5096fe4 100644
--- a/src/libsushi/sushi-utils.c
+++ b/src/libsushi/sushi-utils.c
@@ -39,12 +39,14 @@ void
 sushi_window_set_child_of_external (GtkWindow *window,
                                     const char *handle)
 {
-  ExternalWindow *external_window = create_external_window_from_handle (handle);
+  ExternalWindow *external_window;
 
+  gtk_widget_realize (GTK_WIDGET (window));
+
+  external_window = create_external_window_from_handle (handle);
   if (!external_window)
     return;
 
-  gtk_widget_realize (GTK_WIDGET (window));
   external_window_set_parent_of (external_window,
                                  gtk_widget_get_window (GTK_WIDGET (window)));
   g_object_unref (external_window);


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