From: SourceForge.net <no...@so...> - 2004-07-30 18:36:44
|
Bugs item #905830, was opened at 2004-02-27 13:58 Message generated for change (Comment added) made by rmax You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=905830&group_id=12997 Category: 69. Events Group: obsolete: 8.4.6 Status: Open Resolution: Fixed Priority: 9 Submitted By: Larry W. Virden (lvirden) Assigned to: Jeffrey Hobbs (hobbs) Summary: Change needed for Solaris input method support Initial Comment: To date, developers here have been unable to get tcl/tk 8 to interact with the japenese kanji input method application kinput2 while using SPARC Solaris 8. However, one of our developers spent some time and worked out the changes necessary to get this to work. Here is what the developer reported back to me, regarding the slight change needed so that things work right on Solaris: ./tk8.4.5/generic/tkEvent.c 880a881 > long im_event_mask; 933a935,938 > XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, N ULL); > winPtr->atts.event_mask |= im_event_mask; > XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mas k); > XSetICFocus(winPtr->inputContext); The contractor went on to say: Basically, the window wasn't requesting input method events before trying to filter them with XFilterEvent. There is nothing in the code I added that is Solaris specific. I don't know why Japanese input behaves differently than on other Unix versions. ---------------------------------------------------------------------- >Comment By: Reinhard Max (rmax) Date: 2004-07-30 20:36 Message: Logged In: YES user_id=124643 That the Compose key doesn't work after these environmental changes is not a bug. There can only be one input method active at a time, and that is either kinput2 or Compose. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-07-30 15:29 Message: Logged In: YES user_id=15949 Here's two notes relating to this bug. 1. To get Tk to interact with the japanese x input methods AFTER the patch we include in this bug report, we had to make these environmental variable changes (and then exported the variables): a. LANG="ja" b. XMODIFIERS="@im=kinput2" c. unset LC_ALL LC_CTYPE then make certain that XUSERFILESEARCHPATH includes the directory containing the kinput2 application resource file. Then we had to start kinput2: kinput2 -xim -kinput -canna -cannaserver ourserver & Then, to test within Tk, we used: pack [entry .a]; entry .b entry .c pack .c .b; pack [frame .f]; and used the <shift>Space key to activate the kinput2 over the spot conversion. 2. With the above environmental changes, regardless of whether we used a wish patched with this patch (or rmax's patch, etc.), the Compose key does not work. Without the above environmental changes, the Compose key works just fine, on all 3 entry widgets, on SPARC Solaris 8 (using GNOME , if that is at all relevant). ---------------------------------------------------------------------- Comment By: Reinhard Max (rmax) Date: 2004-07-29 20:03 Message: Logged In: YES user_id=124643 It seems the code block that calls XSetICFocus got inserted at the wrong place. It only gets called when a window gets mapped for the first time, but it should get called on evert FocusIn event, so that the input focus for XIM gets moved to the right window. The new patch should fix this. Larry, would you please check if things still work on Solaris with the new patch applied? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2004-07-29 18:44 Message: Logged In: YES user_id=80530 This patch has apparently introduced a new bug (1000051) in Tk 8.4.7 ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2004-07-21 05:05 Message: Logged In: YES user_id=72656 I had to check that inputContext was not NULL, but otherwise this looks OK on Linux (don't have Solaris with JP patches for testing). Added it to 8.4.7 and 8.5-head. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-07-20 14:18 Message: Logged In: YES user_id=15949 I don't know why, but for some reason, the fact that an updated patch was attached to this message, I thought with a comment, doesn't seem to have included the comment here. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2004-05-04 02:24 Message: Logged In: YES user_id=72656 This patch isn't helpful without context. Please attach patch made with diff -u, as the core-8-4-branch head is different (patch below will not apply). ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-04-21 17:48 Message: Logged In: YES user_id=15949 the patches have been confirmed to work successfully with sparc solaris 8 and tk 8.4.6 - this patch MUST be installed for XIM to work on sparc solaris. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-03-10 12:18 Message: Logged In: YES user_id=15949 Actually, the 'change' to the LC_CTYPE and LC_ALL variables that is being suggested is just to unset them. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-03-10 12:11 Message: Logged In: YES user_id=15949 Turns out that one final resolution to the GNOME issue has turned up. The local setup for GNOME included setting LC_CTYPE and LC_ALL to C before the user ever logged in. This caused problems with input method support. Changing the LC_ values, along with the Tk patch in this report, resulted in the sparc solaris environment being able to use the tk input method support. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-03-08 21:11 Message: Logged In: YES user_id=15949 Turns out that with a slight change to the original patch, things look much better for Tk with regards to the X error that was mentioned. However, there is still one gotcha - unrelated to Tk: First, the new Tk patch: ./tk8.4.5/generic/tkEvent.c 880a881 > long im_event_mask = 0L; 932a934,941 > } > 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); Now, the gotcha - even with this patch, on Sparc Solaris's shipped GNOME distribution, things don't work right out of the box. Instead, we have found that if we rlogin to the machine from a running GNOME session, then set the DISPLAY variable to "machine:0.0" , then start kinput2 and the application, things work fine. This is NOT Tk related - we are seeing similar weird things with non-Tk apps that interact with this kinput2 (version 2.0 fix 2). Things work fine under CDE and OpenWindows AFTER this patch is applied - before this patch, we were unable to get tk apps to interact with kinput2. ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2004-03-05 18:19 Message: Logged In: YES user_id=15949 The developer reports one bug encountered after this patch: If you tell wish to expect a kinput2 input server with LC_CTYPE=ja XMODIFIERS="@im=kinput2" wish and kinput2 isn't running, then an X error is generated X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 2 (X_ChangeWindowAttributes) Value in failed request: 0xffef9a7f Serial number of failed request: 214 Current serial number in output stream: 412 ---- He is working on a fix for this now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=905830&group_id=12997 |