Patch is from https://bugzilla.novell.com/show_bug.cgi?id=206547 --- scim-qtimm-0.9.4/src/qsciminputcontext.cpp 2006-12-20 09:56:19.000000000 +0800 +++ scim-qtimm-0.9.4.new/src/qsciminputcontext.cpp 2006-12-20 10:00:55.000000000 +0800 @@ -659,6 +659,9 @@ if (global.shared_input_method) m_is_on = global.config->read (String (SCIM_CONFIG_FRONTEND_IM_OPENED_BY_DEFAULT), m_is_on); + // Associate this context with the instance. + m_instance->set_frontend_data (static_cast (this)); + global.panel_client->prepare (m_id); global.panel_client->register_input_context (m_id, m_instance->get_factory_uuid ()); set_ic_capabilities (); @@ -902,6 +905,7 @@ if (!global.panel_exited) { global.panel_client->prepare (m_id); + m_instance->set_frontend_data (static_cast(this)); if (global.focused_ic == this) m_instance->focus_out (); @@ -912,6 +916,7 @@ QScimInputContext *old_focused = global.focused_ic; global.focused_ic = this; // XXX: Free the smart pointer, not reset the instance. + m_instance->set_frontend_data (0); m_instance.reset (); global.focused_ic = old_focused; @@ -923,6 +928,7 @@ global.panel_client->remove_input_context (m_id); global.panel_client->send (); } else { + m_instance->set_frontend_data (0); m_instance.reset (); } }