|
@@ -269,6 +269,11 @@ static gboolean mssh_window_session_close(gpointer data)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ /* set the focus on the entry only if the terminal closed has it */
|
|
|
+ if ( gtk_window_get_focus(GTK_WINDOW(data_pair->window)) == GTK_WIDGET(data_pair->terminal) ) {
|
|
|
+ gtk_window_set_focus(GTK_WINDOW(data_pair->window), GTK_WIDGET(data_pair->window->global_entry));
|
|
|
+ }
|
|
|
+
|
|
|
gtk_widget_destroy(data_pair->terminal->menu_item);
|
|
|
|
|
|
gtk_container_remove(GTK_CONTAINER(data_pair->window->grid),
|
|
@@ -278,8 +283,6 @@ static gboolean mssh_window_session_close(gpointer data)
|
|
|
|
|
|
mssh_window_relayout(data_pair->window);
|
|
|
|
|
|
- /* set the focus on the entry */
|
|
|
- gtk_window_set_focus(GTK_WINDOW(data_pair->window), GTK_WIDGET(data_pair->window->global_entry));
|
|
|
}
|
|
|
|
|
|
if(data_pair->window->terminals->len == 0 &&
|