Merge branch 'hotfixes' into develop
Conflicts: include/nana/detail/linux_X11/platform_spec.hpp source/detail/linux_X11/platform_spec.cpp source/paint/detail/native_paint_interface.cpp
This commit is contained in:
@@ -955,7 +955,7 @@ namespace detail
|
||||
}
|
||||
|
||||
keybuf[len] = 0;
|
||||
nana::char_t keychar;
|
||||
nana::char_t keychar = 0;
|
||||
switch(status)
|
||||
{
|
||||
case XLookupKeySym:
|
||||
@@ -984,8 +984,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
|
||||
@@ -1002,7 +1000,7 @@ namespace detail
|
||||
{
|
||||
context.is_alt_pressed = true;
|
||||
}
|
||||
else
|
||||
else if(keychar)
|
||||
{
|
||||
arg_keyboard arg;
|
||||
arg.ignore = false;
|
||||
@@ -1020,7 +1018,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));
|
||||
|
||||
@@ -1096,6 +1096,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
|
||||
}
|
||||
|
||||
|
||||
@@ -575,17 +575,27 @@ namespace nana
|
||||
|
||||
|
||||
//class menubar
|
||||
menubar::menubar(){}
|
||||
menubar::menubar(window wd)
|
||||
{
|
||||
create(wd);
|
||||
}
|
||||
|
||||
menubar::~menubar()
|
||||
{
|
||||
API::umake_event(evt_resized_);
|
||||
}
|
||||
|
||||
void menubar::create(window wd)
|
||||
{
|
||||
widget_object<category::widget_tag, drawerbase::menubar::trigger>
|
||||
::create(wd, rectangle(nana::size(API::window_size(wd).width, 28)));
|
||||
API::attach_menubar(handle());
|
||||
evt_resized_ = API::events(wd).resized([this](const ::nana::arg_resized& arg)
|
||||
{
|
||||
auto sz = this->size();
|
||||
sz.width = arg.width;
|
||||
this->size(sz);
|
||||
});
|
||||
}
|
||||
|
||||
menu& menubar::push_back(const nana::string& text)
|
||||
|
||||
@@ -1196,7 +1196,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