From: Ira W. Snyder Date: Mon, 7 Apr 2008 21:21:27 +0000 (-0700) Subject: [Window] Fix automatic pulldown code X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=HEAD [Window] Fix automatic pulldown code 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. --- diff --git a/tilda-window.c b/tilda-window.c index f26bfc3..44a04e8 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -1342,15 +1342,13 @@ tilda_window_constructor (GType type, for (i=0; iinitial_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);