Bugzilla – Attachment 61935 Details for
Bug 77424
tcl/tk 8.4.11 doesn't support XIM very well.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
A patch against tk cvs head to fix the SCIM XIM issue.
tk-cvs-xim-fixes.diff (text/plain), 2.54 KB, created by
Zhe Su
on 2006-01-04 09:03:05 UTC
(
hide
)
Description:
A patch against tk cvs head to fix the SCIM XIM issue.
Filename:
MIME Type:
Creator:
Zhe Su
Created:
2006-01-04 09:03:05 UTC
Size:
2.54 KB
patch
obsolete
>Index: generic/tkEvent.c >=================================================================== >RCS file: /cvsroot/tktoolkit/tk/generic/tkEvent.c,v >retrieving revision 1.31 >diff -u -p -r1.31 tkEvent.c >--- generic/tkEvent.c 4 Nov 2005 11:52:50 -0000 1.31 >+++ generic/tkEvent.c 4 Jan 2006 06:31:19 -0000 >@@ -449,8 +449,10 @@ InvokeInputMethods( > XSetICFocus(winPtr->inputContext); > } > } >- if (XFilterEvent(eventPtr, None)) { >- return 1; >+ if (eventPtr->type == KeyPress || eventPtr->type == KeyRelease) { >+ if (XFilterEvent(eventPtr, None)) { >+ return 1; >+ } > } > } > return 0; >Index: unix/tkUnixEvent.c >=================================================================== >RCS file: /cvsroot/tktoolkit/tk/unix/tkUnixEvent.c,v >retrieving revision 1.19 >diff -u -p -r1.19 tkUnixEvent.c >--- unix/tkUnixEvent.c 7 Dec 2005 17:32:52 -0000 1.19 >+++ unix/tkUnixEvent.c 4 Jan 2006 06:31:20 -0000 >@@ -334,19 +334,22 @@ static void > TransferXEventsToTcl( > Display *display) > { >- int numFound; > XEvent event; > >- numFound = QLength(display); >- > /* >- * Transfer events from the X event queue to the Tk event queue. >+ * Transfer events from the X event queue to the Tk event queue >+ * after XIM event filtering. KeyPress and KeyRelease events >+ * are filtered in Tk_HandleEvent instead of here, so that Tk's >+ * focus management code can redirect them. > */ >- >- while (numFound > 0) { >+ while (QLength(display) > 0) { > XNextEvent(display, &event); >+ if (event.type != KeyPress && event.type != KeyRelease) { >+ if (XFilterEvent(&event, None)) { >+ continue; >+ } >+ } > Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); >- numFound--; > } > } > >@@ -636,31 +639,10 @@ OpenIM( > { > unsigned short i; > XIMStyles *stylePtr; >- char *modifiers; > >- modifiers = XSetLocaleModifiers(""); >- if (modifiers == NULL) { >+ if (XSetLocaleModifiers("") == NULL) { > goto error; > } >-#if 1 >- /* >- * This is a temporary hack that can be taken back out again >- * once Tk has learned how to deal with SCIM >- */ >- while ((modifiers = strchr(modifiers, '@')) != NULL) { >- if (strncmp(modifiers, "@im=", 4) == 0) { >- /* The first "@im=" entry wins */ >- const char *scim = "@im=SCIM"; >- if (strncmp(modifiers, scim, strlen(scim)) == 0) { >- /* If it is SCIM, we override it */ >- if (XSetLocaleModifiers("@im=local") == NULL) { >- goto error; >- } >- } >- break; >- } >- } >-#endif > > dispPtr->inputMethod = XOpenIM(dispPtr->display, NULL, NULL, NULL); > if (dispPtr->inputMethod == NULL) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 77424
:
48662
| 61935