1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/chinese/tk83/files/patch-ad
Kevin Lo 2c54b710d9 Chineselized Tk ver. 8.3.0. This version is i18n improvement.
This changes the behavior of Tk on X where X Input Methods (XIM) were
recognized and used without question.
With 8.3, they will be recognized and initialized, but not used unless
XIM is turned on (tk useinputmethods 1).  This should only affect users
users with special input methods, and the new default behavior should
be more beneficial to the average user.

Please repo copy, thanks.
2001-02-22 04:09:59 +00:00

35 lines
851 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- tkUnixEvent.c.orig Fri Apr 16 01:51:46 1999
+++ tkUnixEvent.c Wed Feb 21 22:51:52 2001
@@ -161,7 +161,12 @@
(void) XSync(dispPtr->display, False);
(void) XCloseDisplay(dispPtr->display);
}
-
+#ifdef I18N_IMPROVE
+ if (displayPtr->imEncoding != NULL) {
+ Tcl_FreeEncoding(displayPtr->imEncoding);
+ }
+#endif /* I18N_IMPROVE */
+
ckfree((char *) dispPtr);
}
@@ -246,6 +251,17 @@
while (numFound > 0) {
XNextEvent(display, &event);
+#ifdef I18N_IMPROVE
+ /*
+ * To avoid Tk freezing by IM server's protocol bugs,
+ * Re-check queued event after an event is filterd.
+ *
+ */
+ if (XFilterEvent(&event, None) == True) {
+ numFound = XEventsQueued(display, QueuedAlready);
+ continue;
+ }
+#endif /* I18N_IMPROVE */
Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL);
numFound--;
}