|
|
6911ea |
diff -up libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx libX11-1.6.3/modules/im/ximcp/imDefFlt.c
|
|
|
6911ea |
--- libX11-1.6.3/modules/im/ximcp/imDefFlt.c.jx 2015-03-09 18:28:45.000000000 -0400
|
|
|
6911ea |
+++ libX11-1.6.3/modules/im/ximcp/imDefFlt.c 2015-03-10 12:32:31.912149644 -0400
|
|
|
6911ea |
@@ -142,7 +142,7 @@ _XimProtoKeypressFilter(
|
|
|
6911ea |
{
|
|
|
6911ea |
Xim im = (Xim)ic->core.im;
|
|
|
6911ea |
|
|
|
6911ea |
- if (IS_FABRICATED(im)) {
|
|
|
6911ea |
+ if ((ev->keycode == 0) || IS_FABRICATED(im)) {
|
|
|
6911ea |
_XimPendingFilter(ic);
|
|
|
6911ea |
UNMARK_FABRICATED(im);
|
|
|
6911ea |
return NOTFILTERD;
|
|
|
6911ea |
diff -up libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx libX11-1.6.3/modules/im/ximcp/imDefLkup.c
|
|
|
6911ea |
--- libX11-1.6.3/modules/im/ximcp/imDefLkup.c.jx 2015-03-09 18:28:45.000000000 -0400
|
|
|
6911ea |
+++ libX11-1.6.3/modules/im/ximcp/imDefLkup.c 2015-03-10 12:32:31.911149637 -0400
|
|
|
6911ea |
@@ -332,6 +332,17 @@ _XimForwardEvent(
|
|
|
84159c |
XEvent *ev,
|
|
|
84159c |
Bool sync)
|
|
|
84159c |
{
|
|
|
84159c |
+ /*
|
|
|
84159c |
+ * Don't forward a key event which has keycode=0.
|
|
|
84159c |
+ * keycode=0 is reserved for special purpose to let Xmb/wcLookupString()
|
|
|
84159c |
+ * functions know that there is a commited string available from IM.
|
|
|
84159c |
+ */
|
|
|
84159c |
+ if (((ev->type == KeyPress) || (ev->type == KeyRelease))) {
|
|
|
84159c |
+ if (((XKeyEvent *)ev)->keycode == 0) {
|
|
|
84159c |
+ return True;
|
|
|
84159c |
+ }
|
|
|
84159c |
+ }
|
|
|
84159c |
+
|
|
|
84159c |
#ifdef EXT_FORWARD
|
|
|
84159c |
if (((ev->type == KeyPress) || (ev->type == KeyRelease)))
|
|
|
84159c |
if (_XimExtForwardKeyEvent(ic, (XKeyEvent *)ev, sync))
|
|
|
6911ea |
@@ -604,6 +615,19 @@ _XimUnregCommitInfo(
|
|
|
6911ea |
Xfree(info->keysym);
|
|
|
84159c |
ic->private.proto.commit_info = info->next;
|
|
|
84159c |
Xfree(info);
|
|
|
84159c |
+
|
|
|
84159c |
+ /*
|
|
|
84159c |
+ * "Commit" uses fabricated flag to process a commited string
|
|
|
84159c |
+ * from IM engine.
|
|
|
84159c |
+ * Turn off the fabricated flag here (unregister the commited
|
|
|
84159c |
+ * information function). Otherwise, next regular key press
|
|
|
84159c |
+ * event will be ignored at _XimProtoKeypressFilter() and it
|
|
|
84159c |
+ * will not be passed to IM engine.
|
|
|
84159c |
+ */
|
|
|
84159c |
+ if (IS_FABRICATED(ic)) {
|
|
|
84159c |
+ UNMARK_FABRICATED(ic);
|
|
|
84159c |
+ }
|
|
|
84159c |
+
|
|
|
84159c |
return;
|
|
|
84159c |
}
|
|
|
84159c |
|