mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
improve dialog highlighter
This commit is contained in:
parent
c56fd35d4d
commit
fae392e716
@ -2,6 +2,7 @@
|
||||
2023/11/15
|
||||
* 修复layout的auto\_adjust\_size不触发修改事件的问题以及增加判断auto\_adjust\_size(感谢智明提供补丁)
|
||||
* 修复3key和5key不正常的逻辑以及增加一个5key的例子(感谢智明提供补丁)
|
||||
* 修复在高亮对话框显示不正常的问题(感谢智明提供补丁)
|
||||
|
||||
2023/11/14
|
||||
* 导出darray\_bsearch\_index\_ex接口(感谢雨欣提供补丁)
|
||||
|
@ -789,9 +789,35 @@ static ret_t window_manager_default_close_window(widget_t* widget, widget_t* win
|
||||
}
|
||||
if (prev_win != NULL) {
|
||||
if (!widget_is_keyboard(window)) {
|
||||
bool_t find = FALSE;
|
||||
bool_t is_create = TRUE;
|
||||
const char* curr_highlight = NULL;
|
||||
widget_t* widget_highlighter = prev_win;
|
||||
|
||||
wm->curr_win = prev_win;
|
||||
window_manager_dispatch_window_event(prev_win, EVT_WINDOW_TO_FOREGROUND);
|
||||
window_manager_create_highlighter(widget, prev_win);
|
||||
|
||||
WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i)
|
||||
if (!find && iter == prev_win) {
|
||||
find = TRUE;
|
||||
}
|
||||
if (find) {
|
||||
if (!widget_is_support_highlighter(iter)) {
|
||||
is_create = FALSE;
|
||||
break;
|
||||
}
|
||||
curr_highlight = widget_get_prop_str(iter, WIDGET_PROP_HIGHLIGHT, NULL);
|
||||
if (curr_highlight != NULL && *curr_highlight != '\0') {
|
||||
widget_highlighter = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
WIDGET_FOR_EACH_CHILD_END();
|
||||
if (is_create) {
|
||||
wm->curr_win = widget_highlighter;
|
||||
window_manager_create_highlighter(widget, widget_highlighter);
|
||||
wm->curr_win = prev_win;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user