« Return to Thread: Bug in FOX related to composed characters and proposed patch

Re: Bug in FOX related to composed characters and proposed patch

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View in Thread

On Monday 18 May 2009, Roland Baudin wrote:

> Hi there,
>
> some weeks ago, I sent here a message where I described a bug related to
> composed characters and XIM inputs. These characters are frequently used
> for example in french (ex: â ô ), in german (to do the umlaut like in ü
> ä ¶ etc.) and other languages.
>
> For these characters to be correctly input in FOX application, the FOX
> library must be compiled with the --with-xim configure option.
>
> In FOX 1.6.36 and 1.7.19, compiled with the --with-xim option, entering
> composed characters *only* works when the mouse pointer (caution : the
> mouse pointer, not the input cursor) lies within the text field that has
> the focus. Otherwise, if the mouse pointer is elsewhere in the window,
> it is not possible to input characters like â ä ü û¶, etc. This can be
> easily checked with adie : write a text and move the mouse pointer
> outside the adie window. Then entering composed characters don't work
> anymore.
>
> After some (deep) investigations, I finally found where the problem is
> and fixed the bug. I attached here a patch for the FXApp.cpp class of
> FOX 1.6.36.
>
> I succesfully tested this patch on the following Linux systems : Debian
> Lenny (stable), latest Ubuntu, Mandriva 2009 but I didn't test it on
> Windows.
>
> Hope this post could help to definitely fix this annoying bug.

Thanks,

I assume that the little code segment:

      // Keyboard
      case KeyPress:
#ifndef NO_XIM
        focuswin=getFocusWindow();
        if((ev.xkey.keycode!=0) && focuswin && focuswin->getComposeContext()){
          Window w;
          XGetICValues((XIC)focuswin->getComposeContext()->id(),XNFocusWindow,&w,NULL);
          if((focuswin->id()!=w) && XFilterEvent(&ev,(Window)focuswin->id())){
            return true;
            }
          }
#endif


will need to be removed in that case, right?  Otherwise stuff gets filtered twice....


        - Jeroen

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

 « Return to Thread: Bug in FOX related to composed characters and proposed patch