This is borrowed from GtkEntry, and should properly fix https://bugzilla.gnome.org/show_bug.cgi?id=642766