summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-07-21 03:10:05 (GMT)
committerhobbs <hobbs>2004-07-21 03:10:05 (GMT)
commit0c5eaf7b819ccba0d37acb9cc37b66434860acff (patch)
treeed40d9f59af07191992ee50bde487ca32ed2ee51 /generic
parentf95859f4fe3830b7122af3474bdd5c3d17b13f62 (diff)
downloadtk-0c5eaf7b819ccba0d37acb9cc37b66434860acff.zip
tk-0c5eaf7b819ccba0d37acb9cc37b66434860acff.tar.gz
tk-0c5eaf7b819ccba0d37acb9cc37b66434860acff.tar.bz2
* generic/tkEvent.c (InvokeInputMethods): ensure IC focus is set
after creation. [Bug #905830]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkEvent.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index cd0daaf..b90b3fd 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEvent.c,v 1.22 2004/07/05 22:27:12 georgeps Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.23 2004/07/21 03:10:06 hobbs Exp $
*/
#include "tkPort.h"
@@ -409,6 +409,7 @@ InvokeInputMethods(winPtr,eventPtr)
TkDisplay *dispPtr = winPtr->dispPtr;
if ((dispPtr->flags & TK_DISPLAY_USE_IM)) {
if (!(winPtr->flags & (TK_CHECKED_IC|TK_ALREADY_DEAD))) {
+ long im_event_mask = 0L;
winPtr->flags |= TK_CHECKED_IC;
if (dispPtr->inputMethod != NULL) {
#if TK_XIM_SPOT
@@ -424,6 +425,15 @@ InvokeInputMethods(winPtr,eventPtr)
NULL);
#endif
}
+ if (winPtr->inputContext != NULL) {
+ XGetICValues(winPtr->inputContext,
+ XNFilterEvents, &im_event_mask, NULL);
+ if (im_event_mask != 0L) {
+ XSelectInput(winPtr->display, winPtr->window,
+ winPtr->atts.event_mask | im_event_mask);
+ XSetICFocus(winPtr->inputContext);
+ }
+ }
}
if (XFilterEvent(eventPtr, None)) {
return 1;