So I do Questions and Answers
I found a solution to my problem, but no explanation:
In the little program I joigned, I had to replace the line:
if (XSetLocaleModifiers("") == NULL) {
by
if (XSetLocaleModifiers("@im=none") == NULL) {
Output of prog-1 is now correct, and since I modified the application I am
developing the same way, I can now type in characters with dead keys.
XSetLocaleModifiers man page don't give much details, and someone who could give an
explanation of XSetLocaleModifiers("@im=none") would be welcome.
Cheers
Lucien
Le 06/05/2016 à 16:27, Lucien Gentis a écrit :
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.gen...@univ-lorraine.fr
_______________________________________________
xorg@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
_______________________________________________
xorg@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
--
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.gen...@univ-lorraine.fr
_______________________________________________
xorg@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