+
+static void
+propagate_purpose (GtkIMMulticontext *context)
+{
+ GtkInputPurpose purpose;
+ GtkInputHints hints;
+
+ if (context->priv->slave == NULL)
+ return;
+
+ g_object_get (context, "input-purpose", &purpose, NULL);
+ g_object_set (context->priv->slave, "input-purpose", purpose, NULL);
+
+ g_object_get (context, "input-hints", &hints, NULL);
+ g_object_set (context->priv->slave, "input-hints", hints, NULL);
+}
+
+static void
+gtk_im_multicontext_notify (GObject *object,
+ GParamSpec *pspec)
+{
+ propagate_purpose (GTK_IM_MULTICONTEXT (object));
+}