diff options
author | rmax <rmax> | 2004-10-26 16:39:00 (GMT) |
---|---|---|
committer | rmax <rmax> | 2004-10-26 16:39:00 (GMT) |
commit | b485f2b4fade260ea9fcb8a29751b2315eb801af (patch) | |
tree | 885c926d5694a46de052f767eb99e5300b2753ad | |
parent | b0bbf82e6cf6644231f1bec3b8130163b994ca98 (diff) | |
download | tk-b485f2b4fade260ea9fcb8a29751b2315eb801af.zip tk-b485f2b4fade260ea9fcb8a29751b2315eb801af.tar.gz tk-b485f2b4fade260ea9fcb8a29751b2315eb801af.tar.bz2 |
* generic/tkEvent.c (Tk_HandleEvent): Call XSetICFocus whenever
the window receives focus. This fixes bug #905830 but avoids
#1000051.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tkEvent.c | 13 |
2 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2004-10-26 Reinhard Max <max@suse.de> + + * generic/tkEvent.c (Tk_HandleEvent): Call XSetICFocus whenever + the window receives focus. This fixes bug #905830 but avoids + #1000051. + 2004-10-20 Jeff Hobbs <jeffh@ActiveState.com> * win/tkWinWm.c (UpdateWrapper): pass SWP_NOOWNERZORDER to diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 20fbb74..abf7404 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -11,7 +11,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.17.2.5 2004/07/29 21:47:57 dgp Exp $ + * RCS: @(#) $Id: tkEvent.c,v 1.17.2.6 2004/10/26 16:39:01 rmax Exp $ */ #include "tkPort.h" @@ -882,6 +882,7 @@ Tk_HandleEvent(eventPtr) */ dispPtr = winPtr->dispPtr; if ((dispPtr->flags & TK_DISPLAY_USE_IM)) { + long im_event_mask = 0L; if (!(winPtr->flags & (TK_CHECKED_IC|TK_ALREADY_DEAD))) { winPtr->flags |= TK_CHECKED_IC; if (dispPtr->inputMethod != NULL) { @@ -937,6 +938,16 @@ Tk_HandleEvent(eventPtr) #endif } } + if (winPtr->inputContext != NULL && + (eventPtr->xany.type == FocusIn)) { + 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)) { goto done; } |