调整notifyClose默认策略
This commit is contained in:
parent
383fc01ed0
commit
e1070c186f
|
@ -3593,7 +3593,17 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc)
|
|||
break;
|
||||
case SANE_EVENT_UI_CLOSE_SETTING:
|
||||
scanner_->ui_hide();
|
||||
if (notify_close_ == NOTIFY_AUTO)
|
||||
if (notify_close_ == NOTIFY_ALWAYS)
|
||||
{
|
||||
load_sane_util::to_log(1, L"close setting ui and notify close immediately.\r\n");
|
||||
rc = notifyCloseCancel();
|
||||
}
|
||||
else if (notify_close_ == NOTIFY_NONE)
|
||||
{
|
||||
load_sane_util::to_log(1, L"close setting ui and notify close passively (wait eventProcess to do).\r\n");
|
||||
notfify_close_ = true;
|
||||
}
|
||||
else // if (notify_close_ == NOTIFY_AUTO)
|
||||
{
|
||||
load_sane_util::to_log(1, L"close setting ui and notify close in auto mode.\r\n");
|
||||
//if (has_event_called_)
|
||||
|
@ -3605,16 +3615,6 @@ int huagao_ds::handle_scanner_event(int ev, bool from_event_proc)
|
|||
notify_close_thread_->join();
|
||||
notify_close_thread_.reset(new std::thread(&huagao_ds::notify_close_thread, this));
|
||||
}
|
||||
else if (notify_close_ == NOTIFY_ALWAYS)
|
||||
{
|
||||
load_sane_util::to_log(1, L"close setting ui and notify close immediately.\r\n");
|
||||
rc = notifyCloseCancel();
|
||||
}
|
||||
else if (notify_close_ == NOTIFY_NONE)
|
||||
{
|
||||
load_sane_util::to_log(1, L"close setting ui and notify close passively (wait eventProcess to do).\r\n");
|
||||
notfify_close_ = true;
|
||||
}
|
||||
//if(main_thread_id_ == GetCurrentThreadId())
|
||||
// rc = notifyCloseCancel();
|
||||
//else
|
||||
|
|
Loading…
Reference in New Issue