<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>So I do Questions and Answers <br>
</p>
<p>I found a solution to my problem, but no explanation:</p>
<p>In the little program I joigned, I had to replace the line:</p>
<pre>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.
</pre>
Cheers<br>
<br>
Lucien<br>
<br>
<div class="moz-cite-prefix">Le 06/05/2016 à 16:27, Lucien Gentis a
écrit :<br>
</div>
<blockquote
cite="mid:adc03b93-0a58-35f4-6ae0-f72ac7bda540@univ-lorraine.fr"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Additional informations:<br>
<br>
Even XNInputStyle is not set: if I do:<br>
<br>
ic=XCreateIC(im,XNInputStyle,XIMPreeditNothing|XIMStatusNothing,NULL);<br>
long int st;<br>
XGetICValues(ic,XNInputStyle,&st,NULL);<br>
printf ("XIMPreeditNothing|XIMStatusNothing = %ld - style ic =
%ld\n",XIMPreeditNothing|XIMStatusNothing,st);<br>
<br>
I get:<br>
<br>
XIMPreeditNothing|XIMStatusNothing = 1032 - style ic = 1<br>
<br>
(style ic should be 1032)<br>
<br>
I have tested this little program on different machines :<br>
<br>
--- 1st machine:<br>
Ubuntu 14.04: It works<br>
Another Ubuntu 14.04 system: it doesn't work<br>
Ubuntu 12.04: it works<br>
<br>
--- 2nd machine:<br>
Ubuntu 14.04 via VirtualBox on Windows 7: it doesn't work<br>
NetBSD 7.0 via VirtualBox on Windows 7: it works !<br>
Ubuntu 14.04 direct install (or live DVD): it doesn't work<br>
<br>
---3rd machine:<br>
Ubuntu 14.04: it doesn't work<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 28/04/2016 14:40, Lucien Gentis a
écrit :<br>
</div>
<blockquote
cite="mid:1917aa2c-1abf-80d6-1fdf-ef0c17138ab7@univ-lorraine.fr"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
Hi to all,<br>
<br>
My system : Linux - Ubuntu 14.04<br>
<br>
I am developing an application which relies on Xlib Library and
I try to internationalize it.<br>
<br>
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.<br>
<br>
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:<br>
<br>
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:<br>
<br>
XSetICValues(ic,XNFocusWindow,w,NULL);<br>
Window winicfocus;<br>
XGetICValues(ic,XNFocusWindow,&winicfocus,NULL);<br>
printf ("Window w id : %ld - IC focus window :
%ld\n",w,winicfocus);<br>
<br>
I get:<br>
<br>
Window w id : 77594625 - IC focus window : 0<br>
<br>
To illustrate that, I have joined a little programme you should
compile through this command:<br>
gcc -g -Wall prog-1.cc -o prog-1 -lX11<br>
<br>
<pre class="moz-signature" cols="72">--
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 : <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:lucien.gentis@univ-lorraine.fr">lucien.gentis@univ-lorraine.fr</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:xorg@lists.x.org">xorg@lists.x.org</a>: X.Org support
Archives: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freedesktop.org/archives/xorg">http://lists.freedesktop.org/archives/xorg</a>
Info: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.x.org/mailman/listinfo/xorg">https://lists.x.org/mailman/listinfo/xorg</a>
Your subscription address: %(user_address)s</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:xorg@lists.x.org">xorg@lists.x.org</a>: X.Org support
Archives: <a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/archives/xorg">http://lists.freedesktop.org/archives/xorg</a>
Info: <a class="moz-txt-link-freetext" href="https://lists.x.org/mailman/listinfo/xorg">https://lists.x.org/mailman/listinfo/xorg</a>
Your subscription address: %(user_address)s</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
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 : <a class="moz-txt-link-abbreviated" href="mailto:lucien.gentis@univ-lorraine.fr">lucien.gentis@univ-lorraine.fr</a></pre>
</body>
</html>