The Tilda window was not getting focus properly when it was
automatically pulled down for the first time. This change fixes
that behavior, so the Tilda window always gets the focus.
for (i=0; i<self->initial_terminals; ++i)
tilda_window_add_terminal (self);
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)
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);
/* Register this object with DBus */
tilda_window_dbus_register_object (self);