input context attribute "XNFocusWindow"

Lucien Gentis lucien.gentis at univ-lorraine.fr
Fri May 6 14:27:55 UTC 2016


Additional informations:

Even XNInputStyle is not set: if I do:

ic=XCreateIC(im,XNInputStyle,XIMPreeditNothing|XIMStatusNothing,NULL);
long int st;
XGetICValues(ic,XNInputStyle,&st,NULL);
printf ("XIMPreeditNothing|XIMStatusNothing = %ld - style ic = 
%ld\n",XIMPreeditNothing|XIMStatusNothing,st);

I get:

XIMPreeditNothing|XIMStatusNothing = 1032 - style ic = 1

(style ic should be 1032)

I have tested this little program on different machines :

--- 1st machine:
Ubuntu 14.04: It works
Another Ubuntu 14.04 system: it doesn't work
Ubuntu 12.04: it works

--- 2nd machine:
Ubuntu 14.04 via VirtualBox on Windows 7: it doesn't work
NetBSD 7.0 via VirtualBox on Windows 7: it works !
Ubuntu 14.04 direct install (or live DVD): it doesn't work

---3rd machine:
Ubuntu 14.04: it doesn't work





Le 28/04/2016 14:40, Lucien Gentis a écrit :
> Hi to all,
>
> My system : Linux - Ubuntu 14.04
>
> I am developing an application which relies on Xlib Library and I try 
> to internationalize it.
>
> In order to be able to type in accented character, some of them with 
> dead keys, I use XmbLookupString function and a unique Input Context.
>
> Since my app has several X windows, each time one of them gets input 
> focus, I must set "XNFocusWindow" attribute  to it through 
> XSetICValues function, but it doesn't seem to work:
>
> If "w" is the X window I want to set as "XNFocusWindow" attribute of 
> the IC, when I reread this attribute through XGetICValues function, I 
> don't obtain the same value:
>
> XSetICValues(ic,XNFocusWindow,w,NULL);
> Window winicfocus;
> XGetICValues(ic,XNFocusWindow,&winicfocus,NULL);
> printf ("Window w id : %ld - IC focus window : %ld\n",w,winicfocus);
>
> I get:
>
> Window w id : 77594625 - IC focus window : 0
>
> To illustrate that, I have joined a little programme you should 
> compile through this command:
> gcc -g -Wall prog-1.cc -o prog-1 -lX11
>
> -- 
> Lucien GENTIS
> UNIVERSITE DE LORRAINE - ESPE
> Centre de Ressources Informatiques
> 5, Rue Paul Richard
> C.O. 3 - MAXEVILLE
> 54528 LAXOU-CEDEX
>
> Tél. 03 72 74 13 28
> Email :lucien.gentis at univ-lorraine.fr
>
>
> _______________________________________________
> xorg at lists.x.org: X.Org support
> Archives:http://lists.freedesktop.org/archives/xorg
> Info:https://lists.x.org/mailman/listinfo/xorg
> Your subscription address: %(user_address)s

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20160506/0f260840/attachment.html>


More information about the xorg mailing list