Skip to content

Commit

Permalink
improve window_manager_back_to
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Jan 9, 2024
1 parent 6efe9f8 commit edd1539
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

2024/01/09
* 完善utils.py,兼容Python2.7(感谢雨欣提供补丁)
* 修复存在多个模态对话时,window\_manager\_back\_to接口无法正常返回主页窗口的问题(感谢雨欣提供补丁)

2024/01/08
* 完善编译脚本,修改打印信息(感谢智明提供补丁)
Expand Down
4 changes: 4 additions & 0 deletions src/base/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ static ret_t window_manager_back_to_win_sync(widget_t* widget, widget_t* target)
WIDGET_FOR_EACH_CHILD_END()

top = wins.size > 0 ? WIDGET(darray_pop(&wins)) : NULL;
if (widget_is_dialog(top) && dialog_is_modal(top)) {
dialog_quit(top, DIALOG_QUIT_NONE);
top = NULL;
}
for (k = 0; k < wins.size; k++) {
widget_t* iter = WIDGET(wins.elms[k]);
if (widget_is_dialog(iter) && dialog_is_modal(iter)) {
Expand Down

0 comments on commit edd1539

Please sign in to comment.