[Window] Fix automatic pulldown code master
authorIra W. Snyder <devel@irasnyder.com>
Mon, 7 Apr 2008 21:21:27 +0000 (14:21 -0700)
committerIra W. Snyder <devel@irasnyder.com>
Mon, 7 Apr 2008 21:21:27 +0000 (14:21 -0700)
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.

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);
 
        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);