Avoid grabbing the filter entry if it is not realized

gtk_widget_grab_focus() shouldn't be called on a widget that isn't
realized. gtk_widget_get_realized(window->filter_entry) will always
evaluate to FALSE at that codepoint.

Closes: https://gitlab.xfce.org/apps/xfce4-taskmanager/-/issues/40
This commit is contained in:
Jan Ziak
2021-03-05 04:39:01 +01:00
committed by Jan Ziak
parent 0d06dd82cf
commit c63dc99a51

View File

@@ -316,8 +316,6 @@ xtm_process_window_init (XtmProcessWindow *window)
g_signal_connect (G_OBJECT(window->filter_entry), "icon-press", G_CALLBACK(filter_entry_icon_pressed_cb), NULL);
g_signal_connect (G_OBJECT(window->filter_entry), "changed", G_CALLBACK(filter_entry_keyrelease_handler), window->treeview);
gtk_widget_set_tooltip_text (window->filter_entry, _("Filter on process name"));
gtk_widget_grab_focus (GTK_WIDGET (window->filter_entry));
}
static void