-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/01/12 20:45, Rodolfo kix Garcia wrote:

> On 09/01/12 19:12, Andreas Metzler wrote:
>> On 2012-01-08 Rodolfo kix Garcia<k...@kix.es>  wrote:
>>
>>> I can do it. I can set the Workspace name to "ö" o "ñ" using the
>>> dialog box.
>> Hello,
>> I have tried using the Method listed in the FAQ:
>>
>> Application-Menu ->  WorkSpace ->  Workspaces ->
>>     Ctrl-Leftklick on the to be renamed Workspace.
>>
>> cu andreas
> I can confirm that. I can change the Workspace name using right over the
> Clip. Using the application menu, I can't enter non ascii characters.
> 
> Thanks,
> kix





Hi,

I try to take a look in the source code.

1. src/menu.c:1151 - The menu entry is edited here.

When the user press "Ctrl + LClick", the source enter in this function.
The function creates a WTextInput object (text field) and the user can
type characters. The characters are read at low level (WMNextEvent).
Every character is sent to "handle_anything" pointer function.

The function handle_anything is textEventHandler, at src/text.c Because
XEvent is "KeyPress", the function asigned is "handleKeyPress" (see
src/text.c:510)

2. The function handleKeyPress read character by character events. This
function checks that the character is not a keypad, is arrow -> or <-,...

How? Using XLookupString function:

src/text.c:76 count = XLookupString(event, buffer, 32, &ksym, NULL);

At the end of the function we can see (line 138, src/text.c):

                default:
                        if (count == 1 && !iscntrl(buffer[0])) {
                                buffer[count] = 0;
                                textInsert(wtext, buffer);
                        }

But count is "2" here if is "non ascii characters" (","'",""","ñ", etc).
Then the character is not written. If we remove the "if" conditional,
and we type "á" we will get "'" + "a" in the inserted text. Why?

Look for example http://www.tux.org/~balsa/linux/deadkeys/index.html
"Well, it seems most X client programmers have chosen the "expedient"
wait to handle keyboard input, and so use XLookupString. The only
problem here is that XLookupString does not know how to compose keys,
and so entirely ignores dead keys :-(, accepting only those accented
characters that have a corresponding key on the keyboard."

Ok, this is the reason of this bug, we cannot use these characters
(tilde,...) with this method.

Why we can change the name using right click on the Clip. Why? because
the clip is using the functions of WINGs. Can we change the menu
functions to WINGs?... probably yes, but I don't know. Probably the full
code of menu should be re-written.

Can somebody put more light here? Ideas?

Thanks.

kix
- -- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPC3mdAAoJEHsfVJByt0kjBlMQALLqFC+8osShntLbMmNYE89Q
CfEjb3sVrAPqf9Hr20gCEISFrjyoxbdKvGa1wOVCO6zJOXMq4ivVSeHOJBVUHeOD
AaftuoXu0BIN5DDbc4rZK1MZN8R1//pVEprHCVXleeKvOtNbOoElBgVl8dQHB/LW
YKP/voKCO3lVwg5JU+fpuuaMdPoNhtyBomljFusePuc/dP4hZOLl+++OOaNxZzET
jdmKx2CqzPC8prC/iam785FevULHPCBisNKGvG74qDTD/TJATK0vGjkIGzH7HhmP
lUt42YVnqbzRfXOPsBVkHjhsnlL8BUCDPFQV2n33OojfX/NaF7VdumbsQCDz+rTR
uRmNsLpgURMYsNvHfLEbQ8c2UIyVRncDfMWfriCf2345IP0Oo7wW09blTYsf6YHn
tQfVIUEeKy6Z6vWuWzgVM9W4P7hnKxagUxYRxD1uOsCezpAYvcsYr90iqYBOP+zb
uk54O3AmN+G0sORafHk3oyolg/dIbzjlEMSH0SkKwAwRT5tTl8E4TLNyHosSrfvX
Ge7IxSysA4Cz/jr2v74GwcyPfrGoTvyqR1zVp5UhjFEqm21TLaafhYgpI67rTsoQ
+4E/vkGpopRHcqdW0aiRiDLiR9NVWbjIwSE/vNe60yocqBwOjqVq6c6Z5CVyEx8F
Zxti0mY7ROVao9lS2YOp
=PGbQ
-----END PGP SIGNATURE-----


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to