ishcherb / rpms / ibus

Forked from rpms/ibus 6 years ago
Clone
1faf033
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
1faf033
index eef062c..d644d69 100644
1faf033
--- a/client/gtk2/ibusimcontext.c
1faf033
+++ b/client/gtk2/ibusimcontext.c
1faf033
@@ -845,6 +845,18 @@ ibus_im_context_focus_in (GtkIMContext *context)
1faf033
         return;
1faf033
 
1faf033
     /* don't set focus on password entry */
1faf033
+#if GTK_CHECK_VERSION (3, 6, 0)
1faf033
+    {
1faf033
+        GtkInputPurpose purpose;
1faf033
+
1faf033
+        g_object_get (G_OBJECT (context),
1faf033
+                      "input-purpose", &purpose,
1faf033
+                      NULL);
1faf033
+
1faf033
+        if (purpose == GTK_INPUT_PURPOSE_PASSWORD)
1faf033
+            return;
1faf033
+    }
1faf033
+#endif
1faf033
     if (ibusimcontext->client_window != NULL) {
1faf033
         GtkWidget *widget;
1faf033