[Window] Fix automatic pulldown code
[tilda-gobject.git] / tilda-window.c
index f26bfc3..44a04e8 100644 (file)
@@ -1342,15 +1342,13 @@ tilda_window_constructor (GType                  type,
        for (i=0; i<self->initial_terminals; ++i)
                tilda_window_add_terminal (self);
 
-       /* Show us if we're ready. If not, just remain hidden. All sub-widgets must
-        * be gtk_widget_show()n by this point. */
+       /* Realize the window (only sets up X resources), and set its current state */
+       gtk_widget_realize (self->window);
+       self->state = WINDOW_UP;
+
+       /* If we should be shown now, do a mock call of the global callback */
        if (!self->hidden_at_start)
-       {
-               gtk_widget_show (self->window);
-               self->state = WINDOW_DOWN;
-       }
-       else
-               self->state = WINDOW_UP;
+               tilda_window_keybinding_cb (NULL, self);
 
        /* Register this object with DBus */
        tilda_window_dbus_register_object (self);