From 472c37ea7d542b6eebe0d6c9415bb901361346b2 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Mon, 7 Apr 2008 14:21:27 -0700 Subject: [PATCH] [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. --- tilda-window.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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); -- 2.25.1