From: Davyd Madeley Date: Fri, 10 Apr 2009 16:53:57 +0000 (+0000) Subject: Unset focus from GtkEntry when editing is stopped X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=112c98327f8a59f8995a8698ad60145f4bc0e2db Unset focus from GtkEntry when editing is stopped From: Davyd Madeley svn path=/trunk/; revision=2781 --- diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c index 32f32acb..3cc69dfc 100644 --- a/libempathy-gtk/empathy-presence-chooser.c +++ b/libempathy-gtk/empathy-presence-chooser.c @@ -260,7 +260,13 @@ set_status_editing (EmpathyPresenceChooser *self, gboolean editing) GTK_ENTRY_ICON_PRIMARY, TRUE); - // FIXME - move the focus somewhere + /* attempt to get the toplevel for this widget */ + GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (self)); + if (GTK_WIDGET_TOPLEVEL (window) && GTK_IS_WINDOW (window)) + { + /* unset the focus */ + gtk_window_set_focus (GTK_WINDOW (window), NULL); + } priv->editing_status = FALSE; }