A fix for non-English input issue.
Extended ASCII characters input issue, window title bar issue.
This commit is contained in:
@@ -954,7 +954,7 @@ namespace detail
|
||||
}
|
||||
|
||||
keybuf[len] = 0;
|
||||
nana::char_t keychar;
|
||||
nana::char_t keychar = 0;
|
||||
switch(status)
|
||||
{
|
||||
case XLookupKeySym:
|
||||
@@ -983,8 +983,6 @@ namespace detail
|
||||
keychar = keyboard::os_insert; break;
|
||||
case XK_Delete:
|
||||
keychar = keyboard::os_del; break;
|
||||
default:
|
||||
keychar = keysym;
|
||||
}
|
||||
context.platform.keychar = keychar;
|
||||
if(keychar == keyboard::tab && (false == (msgwnd->flags.tab & detail::tab_type::eating))) //Tab
|
||||
@@ -1001,7 +999,7 @@ namespace detail
|
||||
{
|
||||
context.is_alt_pressed = true;
|
||||
}
|
||||
else
|
||||
else if(keychar)
|
||||
{
|
||||
arg_keyboard arg;
|
||||
arg.ignore = false;
|
||||
@@ -1019,7 +1017,7 @@ namespace detail
|
||||
}
|
||||
case XLookupChars:
|
||||
{
|
||||
const nana::char_t * charbuf;
|
||||
const ::nana::char_t* charbuf;
|
||||
#if defined(NANA_UNICODE)
|
||||
nana::detail::charset_conv charset("UTF-32", "UTF-8");
|
||||
const std::string& str = charset.charset(std::string(keybuf, keybuf + len));
|
||||
|
||||
@@ -1099,6 +1099,9 @@ namespace nana{
|
||||
nana::detail::platform_scope_guard psg;
|
||||
::XStringListToTextProperty(&text, 1, &name);
|
||||
::XSetWMName(restrict::spec.open_display(), reinterpret_cast<Window>(wd), &name);
|
||||
::XChangeProperty(restrict::spec.open_display(), reinterpret_cast<Window>(wd),
|
||||
restrict::spec.atombase().net_wm_name, restrict::spec.atombase().utf8_string, 8,
|
||||
PropModeReplace, reinterpret_cast<unsigned char*>(text), mbstr.size());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1193,7 +1193,7 @@ namespace nana{ namespace widgets
|
||||
undo(false);
|
||||
break;
|
||||
default:
|
||||
if (key >= 0xFF || (32 <= key && key <= 126))
|
||||
if (key > 0x7F || (32 <= key && key <= 126))
|
||||
put(key);
|
||||
else if (sizeof(nana::char_t) == sizeof(char))
|
||||
{ //Non-Unicode Version for Non-English characters
|
||||
|
||||
Reference in New Issue
Block a user