stop changing focus when dbl clicks on form/panel background

This commit is contained in:
Jinhao
2015-05-20 02:26:39 +08:00
parent aac94e238b
commit 8515fff8d0
3 changed files with 36 additions and 51 deletions

View File

@@ -726,7 +726,7 @@ namespace detail
last_mouse_down_window = msgwnd;
auto new_focus = (msgwnd->flags.take_active ? msgwnd : msgwnd->other.active_window);
if(new_focus)
if(new_focus && !new_focus->flags.ignore_mouse_focus)
{
context.event_window = new_focus;
auto kill_focus = brock.wd_manager.set_focus(new_focus, false);
@@ -1028,18 +1028,12 @@ namespace detail
arg_keyboard argkey;
brock.get_key_state(argkey);
auto tstop_wd = brock.wd_manager.tabstop(msgwnd, argkey.shift);
while (tstop_wd)
if (tstop_wd)
{
if (!tstop_wd->flags.ignore_mouse_focus)
{
brock.wd_manager.set_focus(tstop_wd, false);
brock.wd_manager.do_lazy_refresh(msgwnd, false);
brock.wd_manager.do_lazy_refresh(tstop_wd, true);
root_runtime->condition.tabstop_focus_changed = true;
break;
}
tstop_wd = brock.wd_manager.tabstop(tstop_wd, is_forward);
brock.wd_manager.set_focus(tstop_wd, false);
brock.wd_manager.do_lazy_refresh(msgwnd, false);
brock.wd_manager.do_lazy_refresh(tstop_wd, true);
root_runtime->condition.tabstop_focus_changed = true;
}
}
else if(keyboard::alt == keychar)