[SCIM] patch for scim-0.9.5/modules/FrontEnd/scim_x11_frontend.cpp

CanIL Computer canil_computer at sil.org
Thu Apr 22 07:57:10 EST 2004


Hi James,

I am writing an input module for scim which brings the functionality of 
Tavultesoft Keyman (http://www.tavultesoft.com/keyman/)  to Linux. One 
of the requirements of the module is that it be notified when the ic 
gains and loses focus. I am using the server instance focus_in and 
focus_out methods, and everything works fine except when ctrl-space is 
used to close the input server. When the input server is opened by 
hitting ctrl-space, the focus_in method is called, but when the input 
server is closed by hitting ctrl-space (or selecting the English IM), 
focus_out is not called. The following patch adds that functionality to 
/scim_x11_frontend.cpp. Would it be possible to include this in the next 
version of scim?

Thanks for your consideration.

Doug Rintoul

SIL Intl.

--- scim-0.9.5/modules/FrontEnd/scim_x11_frontend.cpp   2004-04-12 
20:44:43.000000000 -0700
+++ scim-0.9.5.new/modules/FrontEnd/scim_x11_frontend.cpp       
2004-04-21 14:33:57.810895510 -0700
@@ -1525,6 +1525,10 @@
 {
     if (validate_ic (ic)) {
         SCIM_DEBUG_FRONTEND(2) << " IMS Forward event handler -- turn 
off server.\n";
+
+        if (validate_ic (m_focus_ic))
+            focus_out_server_instance (m_focus_ic->si_id);
+
         ic->xims_on = false;

         if (ims_is_preedit_callback_mode (ic))




More information about the scim mailing list