[uim-commit] r3012 - trunk/gtk

ekato at freedesktop.org ekato at freedesktop.org
Fri Jan 27 20:48:03 PST 2006


Author: ekato
Date: 2006-01-27 20:47:59 -0800 (Fri, 27 Jan 2006)
New Revision: 3012

Modified:
   trunk/gtk/gtk-im-uim.c
Log:
* gtk/gtk-im-uim.c : Again, use toplevel key event by default.
(im_uim_focus_in) : Disconnect signal before connecting to new
  one.


Modified: trunk/gtk/gtk-im-uim.c
===================================================================
--- trunk/gtk/gtk-im-uim.c	2006-01-28 04:13:23 UTC (rev 3011)
+++ trunk/gtk/gtk-im-uim.c	2006-01-28 04:47:59 UTC (rev 3012)
@@ -61,8 +61,8 @@
 #include "key-util-gtk.h"
 
 /* select either of these two, or filter key event will be used */
-#define IM_UIM_USE_SNOOPER	1
-#define IM_UIM_USE_TOPLEVEL	0
+#define IM_UIM_USE_SNOOPER	0
+#define IM_UIM_USE_TOPLEVEL	1
 
 /* exported symbols */
 GtkIMContext *im_module_create(const gchar *context_id);
@@ -936,6 +936,13 @@
     snooper_installed = TRUE;
   }
 #elif IM_UIM_USE_TOPLEVEL
+  if (cur_toplevel) {
+    if (cur_key_press_handler_id)
+      g_signal_handler_disconnect(cur_toplevel, cur_key_press_handler_id);
+    if (cur_key_press_handler_id)
+      g_signal_handler_disconnect(cur_toplevel, cur_key_release_handler_id);
+  }
+
   toplevel = gtk_widget_get_toplevel(uic->widget);
   cur_toplevel = toplevel;
 



More information about the uim-commit mailing list