[immodule-qt] Send IMEnd event on reset

Choe Hwanjin krisna at kldp.org
Sun Dec 5 12:27:14 EET 2004


Hello,
I'm Choe Hwanjin, Korean XIM nabi(http://nabi.kldp.net/english.html) developer.

I think that in QInputContext::reset(), input context should send IMEnd
event with returned string.
If it does not send IMEnd event, when user click mouse to change focus to
another widget, preedit string has gone away.
I think last preedit string has to be commited on focus changing.
So sending IMEnd event on reset function is needed.

I attach the patch.

-------------- next part --------------
--- qximinputcontext_x11.cpp.orig	2004-12-05 19:07:38.000000000 +0900
+++ qximinputcontext_x11.cpp	2004-12-05 19:10:48.000000000 +0900
@@ -719,8 +719,10 @@
 	resetClientState();
 
 	char *mb = XmbResetIC((XIC) ic);
-	if (mb)
+	if (mb) {
+	    sendIMEvent( QEvent::IMEnd, QString::fromLocal8Bit(mb) );
 	    XFree(mb);
+	}
     }
 #endif // !QT_NO_XIM
 }


More information about the immodule-qt mailing list