[gtk+/wip/im-osk-position: 2/6] im: Forward the slave's ::clear-area signal in GtkIMMultiContext



commit d8c0a1e28ee83e68a2189199b9fd2f6a0998d48a
Author: Carlos Garnacho <carlos lanedo com>
Date:   Wed Jun 27 15:45:51 2012 +0200

    im: Forward the slave's ::clear-area signal in GtkIMMultiContext

 gtk/gtkimmulticontext.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c
index 8ff04da..a7d0ab0 100644
--- a/gtk/gtkimmulticontext.c
+++ b/gtk/gtkimmulticontext.c
@@ -99,6 +99,9 @@ static gboolean gtk_im_multicontext_delete_surrounding_cb   (GtkIMContext      *
 							     gint               offset,
 							     gint               n_chars,
 							     GtkIMMulticontext *multicontext);
+static void     gtk_im_multicontext_clear_area_cb           (GtkIMContext      *slave,
+                                                             GdkRectangle      *rect,
+                                                             GtkIMMulticontext *multicontext);
 
 static const gchar *global_context_id = NULL;
 
@@ -223,6 +226,9 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext,
       g_signal_connect (priv->slave, "delete-surrounding",
 			G_CALLBACK (gtk_im_multicontext_delete_surrounding_cb),
 			multicontext);
+      g_signal_connect (priv->slave, "clear-area",
+			G_CALLBACK (gtk_im_multicontext_clear_area_cb),
+			multicontext);
       
       if (!priv->use_preedit)	/* Default is TRUE */
 	gtk_im_context_set_use_preedit (slave, FALSE);
@@ -545,6 +551,14 @@ gtk_im_multicontext_delete_surrounding_cb (GtkIMContext      *slave,
 }
 
 static void
+gtk_im_multicontext_clear_area_cb (GtkIMContext      *slave,
+                                   GdkRectangle      *rect,
+                                   GtkIMMulticontext *multicontext)
+{
+  g_signal_emit_by_name (multicontext, "clear-area", rect);
+}
+
+static void
 activate_cb (GtkWidget         *menuitem,
 	     GtkIMMulticontext *context)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]