summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-07-21 03:07:02 (GMT)
committerhobbs <hobbs>2004-07-21 03:07:02 (GMT)
commita1273c1a146be8da4e9a6fb5c3fde32d9c5971a5 (patch)
tree1c7569a981086da12cc6aeb1f00c6253d538c3d5
parent1104fd0b70deabeff7a4c71fe201b3dc8626411b (diff)
downloadtk-a1273c1a146be8da4e9a6fb5c3fde32d9c5971a5.zip
tk-a1273c1a146be8da4e9a6fb5c3fde32d9c5971a5.tar.gz
tk-a1273c1a146be8da4e9a6fb5c3fde32d9c5971a5.tar.bz2
* generic/tkEvent.c (Tk_HandleEvent): ensure IC focus is set after
creation. [Bug #905830]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkEvent.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 17548f9..83d4ade 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-20 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkEvent.c (Tk_HandleEvent): ensure IC focus is set after
+ creation. [Bug #905830]
+
2004-07-20 Daniel Steffen <das@users.sourceforge.net>
* unix/tcl.m4: fixed Darwin autoconf breakage caused by
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 117f873..a1f9a9f 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.2 2004/02/16 23:09:25 wolfsuit Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.17.2.3 2004/07/21 03:07:06 hobbs Exp $
*/
#include "tkPort.h"
@@ -883,6 +883,7 @@ Tk_HandleEvent(eventPtr)
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
@@ -936,6 +937,15 @@ Tk_HandleEvent(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)) {
goto done;