diff -Npur fcitx-4.2.8.3/src/frontend/gtk2/fcitximcontext-gio.c fcitx-4.2.8.3-new/src/frontend/gtk2/fcitximcontext-gio.c --- fcitx-4.2.8.3/src/frontend/gtk2/fcitximcontext-gio.c 2013-09-28 16:33:14.000000000 +0800 +++ fcitx-4.2.8.3-new/src/frontend/gtk2/fcitximcontext-gio.c 2014-05-07 04:55:07.227490523 +0800 @@ -971,7 +971,14 @@ _fcitx_im_context_set_capacity(FcitxIMCo if (GTK_IS_ENTRY (widget) && !gtk_entry_get_visibility (GTK_ENTRY (widget))) { flags |= CAPACITY_PASSWORD; - } + } else { +#if GTK_CHECK_VERSION(3, 6, 0) + GtkInputPurpose purpose; + g_object_get(fcitxcontext, "input-purpose", &purpose, NULL); + if (purpose == GTK_INPUT_PURPOSE_PASSWORD) + flags |= CAPACITY_PASSWORD; +#endif + } } gboolean update = FALSE;