From 1871ff031211a842601821735cae7a6d7600ca05 Mon Sep 17 00:00:00 2001 From: Choe Hwanjin Date: Thu, 13 Oct 2011 07:58:02 +0900 Subject: XIM: Make Xim handle NEED_SYNC_REPLY flag NEED_SYNC_REPLY flag should be in Xim not in Xic. Because the focused Xic can be changed before sending sync reply. After focused Xic changed, the new Xic doesn't have NEED_SYNC_REPLY flag enabled, so libX11 doesn't send XIM_SYNC_REPLY packet. This patch adds sync reply flag to Xim and removes sync reply from Xic. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7869 Signed-off-by: Choe Hwanjin Reviewed-by: Jeremy Huddleston Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/imDefFlt.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'nx-X11/lib/X11/imDefFlt.c') diff --git a/nx-X11/lib/X11/imDefFlt.c b/nx-X11/lib/X11/imDefFlt.c index 9717aa2c3..6259fb7f7 100644 --- a/nx-X11/lib/X11/imDefFlt.c +++ b/nx-X11/lib/X11/imDefFlt.c @@ -128,9 +128,9 @@ _XimPendingFilter( { Xim im = (Xim)ic->core.im; - if (IS_NEED_SYNC_REPLY(ic)) { + if (IS_NEED_SYNC_REPLY(im)) { (void)_XimProcSyncReply(im, ic); - UNMARK_NEED_SYNC_REPLY(ic); + UNMARK_NEED_SYNC_REPLY(im); } return; } @@ -140,13 +140,11 @@ _XimProtoKeypressFilter( Xic ic, XKeyEvent *ev) { -#ifdef XIM_CONNECTABLE Xim im = (Xim)ic->core.im; -#endif - if (IS_FABLICATED(ic)) { + if (IS_FABRICATED(im)) { _XimPendingFilter(ic); - UNMARK_FABLICATED(ic); + UNMARK_FABRICATED(im); return NOTFILTERD; } @@ -203,13 +201,11 @@ _XimProtoKeyreleaseFilter( Xic ic, XKeyEvent *ev) { -#ifdef XIM_CONNECTABLE Xim im = (Xim)ic->core.im; -#endif - if (IS_FABLICATED(ic)) { + if (IS_FABRICATED(im)) { _XimPendingFilter(ic); - UNMARK_FABLICATED(ic); + UNMARK_FABRICATED(im); return NOTFILTERD; } -- cgit v1.2.3 From 11d6dac92b6c3c3f62d49817809ce8c6a61c9293 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 22 Oct 2012 13:54:11 -0500 Subject: XIM: remove Private and Public macros Private is a struct member name in mingw-w64 , causing this useless define in a private header to break the build. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/imDefFlt.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'nx-X11/lib/X11/imDefFlt.c') diff --git a/nx-X11/lib/X11/imDefFlt.c b/nx-X11/lib/X11/imDefFlt.c index 6259fb7f7..b6473e176 100644 --- a/nx-X11/lib/X11/imDefFlt.c +++ b/nx-X11/lib/X11/imDefFlt.c @@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE. #include "Xlcint.h" #include "Ximint.h" -Private long +static long _XimTriggerCheck( Xim im, XKeyEvent *ev, @@ -66,7 +66,7 @@ _XimTriggerCheck( return -1; } -Private long +static long _XimTriggerOnCheck( Xim im, XKeyEvent *ev) @@ -75,7 +75,7 @@ _XimTriggerOnCheck( &im->private.proto.im_onkeylist[1]); } -Private long +static long _XimTriggerOffCheck( Xim im, XKeyEvent *ev) @@ -84,7 +84,7 @@ _XimTriggerOffCheck( &im->private.proto.im_offkeylist[1]); } -Private Bool +static Bool _XimOnKeysCheck( Xic ic, XKeyEvent *ev) @@ -103,7 +103,7 @@ _XimOnKeysCheck( return False; } -Private Bool +static Bool _XimOffKeysCheck( Xic ic, XKeyEvent *ev) @@ -122,7 +122,7 @@ _XimOffKeysCheck( return False; } -Private void +static void _XimPendingFilter( Xic ic) { @@ -135,7 +135,7 @@ _XimPendingFilter( return; } -Private Bool +static Bool _XimProtoKeypressFilter( Xic ic, XKeyEvent *ev) @@ -186,7 +186,7 @@ _XimProtoKeypressFilter( return NOTFILTERD; } -Private Bool +static Bool _XimFilterKeypress( Display *d, Window w, @@ -196,7 +196,7 @@ _XimFilterKeypress( return _XimProtoKeypressFilter((Xic)client_data, (XKeyEvent *)ev ); } -Private Bool +static Bool _XimProtoKeyreleaseFilter( Xic ic, XKeyEvent *ev) @@ -247,7 +247,7 @@ _XimProtoKeyreleaseFilter( return NOTFILTERD; } -Private Bool +static Bool _XimFilterKeyrelease( Display *d, Window w, @@ -257,7 +257,7 @@ _XimFilterKeyrelease( return _XimProtoKeyreleaseFilter((Xic)client_data, (XKeyEvent *)ev); } -Private void +static void _XimRegisterKeyPressFilter( Xic ic) { @@ -274,7 +274,7 @@ _XimRegisterKeyPressFilter( return; } -Private void +static void _XimRegisterKeyReleaseFilter( Xic ic) { @@ -291,7 +291,7 @@ _XimRegisterKeyReleaseFilter( return; } -Private void +static void _XimUnregisterKeyPressFilter( Xic ic) { @@ -307,7 +307,7 @@ _XimUnregisterKeyPressFilter( return; } -Private void +static void _XimUnregisterKeyReleaseFilter( Xic ic) { @@ -323,7 +323,7 @@ _XimUnregisterKeyReleaseFilter( return; } -Public void +void _XimRegisterFilter( Xic ic) { @@ -333,7 +333,7 @@ _XimRegisterFilter( return; } -Public void +void _XimUnregisterFilter( Xic ic) { @@ -342,7 +342,7 @@ _XimUnregisterFilter( return; } -Public void +void _XimReregisterFilter( Xic ic) { @@ -354,7 +354,7 @@ _XimReregisterFilter( return; } -Private Bool +static Bool _XimFilterServerDestroy( Display *d, Window w, @@ -376,7 +376,7 @@ _XimFilterServerDestroy( return True; } -Public void +void _XimRegisterServerFilter( Xim im) { @@ -395,7 +395,7 @@ _XimRegisterServerFilter( return; } -Public void +void _XimUnregisterServerFilter( Xim im) { -- cgit v1.2.3