? gnopernicus/intltool-modules
? gnopernicus/libke.c
Index: gnopernicus/kbd_mouse/libke/libke.c
===================================================================
RCS file: /cvs/gnome/gnopernicus/kbd_mouse/libke/libke.c,v
retrieving revision 1.57
diff -u -r1.57 libke.c
--- gnopernicus/kbd_mouse/libke/libke.c	29 Jan 2004 09:43:46 -0000	1.57
+++ gnopernicus/kbd_mouse/libke/libke.c	3 May 2004 13:44:53 -0000
@@ -69,6 +69,12 @@
 
 static gint 			ke_log_flags;
 
+typedef struct
+{
+    gint    flag;
+    SREvent *evnt;
+} IdleStruct;    
+    
 #define KE_INTERESTED_MODIFIERS_NUMBER 6
 struct
 {
@@ -234,6 +240,31 @@
 **/
 static KEStateEnum ke_keyboard_status = KE_IDLE;
 
+IdleStruct* ke_idle_struct_new ()
+{
+    IdleStruct* ke_idle;
+    ke_idle = g_new0 (IdleStruct, 1);
+    return ke_idle;
+}
+
+void ke_idle_struct_free (IdleStruct *ke_idle)
+{
+    sre_release_reference (ke_idle->evnt);
+    g_free (ke_idle);
+}
+
+static gboolean
+ke_repot_layer_cmd (gpointer data)
+{
+    IdleStruct *ke_idle = (IdleStruct*)data;
+
+    if (ke_keyboard_event_sink_cb != NULL) 
+	ke_keyboard_event_sink_cb (ke_idle->evnt, ke_idle->flag);
+	
+    ke_idle_struct_free (ke_idle);
+    return FALSE;
+}
+
 /**
  * ke_log_at_spi
  *
@@ -398,6 +429,7 @@
 {
     SREvent *evnt = NULL;
     SRHotkeyData *srhotkey_data = NULL;
+    IdleStruct *ke_idle;
     evnt = sre_new ();
     sru_return_if_fail (evnt);
     srhotkey_data = (SRHotkeyData *) g_new0 (SRHotkeyData, 1);
@@ -424,9 +456,14 @@
 	ke_log_gnopernicus (evnt);
 	
 	if (ke_keyboard_event_sink_cb != NULL) 
-	    ke_keyboard_event_sink_cb (evnt,0);
-    }
-    
+	{
+	    sre_add_reference (evnt);
+	    ke_idle = ke_idle_struct_new ();
+	    ke_idle->flag = 0;
+	    ke_idle->evnt = evnt;
+	    g_idle_add (ke_repot_layer_cmd, ke_idle);
+	}
+    }	
     sre_release_reference (evnt);
 }
 
@@ -566,6 +603,7 @@
 }
 
 
+
 /**
  *
  * ke_call_keyboard_layer_cb
@@ -584,6 +622,7 @@
 			   SREventType  event_type)
 {
     SREvent *evnt = NULL;
+    IdleStruct *ke_idle;
     
     sru_return_if_fail (buf);
     sru_return_if_fail (strlen(buf) != 0);
@@ -606,9 +645,14 @@
 
 	/* call event sink from srcore */
         if (ke_keyboard_event_sink_cb != NULL) 
-	    ke_keyboard_event_sink_cb (evnt, flag);
-    }
-	
+	{
+	    sre_add_reference (evnt);
+	    ke_idle = ke_idle_struct_new ();
+	    ke_idle->flag = flag;
+	    ke_idle->evnt = evnt;
+	    g_idle_add (ke_repot_layer_cmd, ke_idle);
+	}
+    }	
     sre_release_reference (evnt);
 }
 