For those interested, here's a way to get the desired result. The source of gtkentry.c shows that if the entry receives a click, it resets the selection to the current position of the cursor. Hence the following button-press-event callback works:
static gboolean event_cb(GtkWidget*w,GdkEvent*event,gpointer p) { if(!GTK_WIDGET_HAS_FOCUS(w)){ gtk_widget_grab_focus(w); return TRUE; } return FALSE; } _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list