Skip to content

Commit

Permalink
improve pages for 3key 5key
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Jun 14, 2024
1 parent 188eab5 commit 45395c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 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/06/14
* 给widget_visible_in_scroll_view.inc增加注释和修复默认滚动规则的算法(感谢智明提供补丁)
* 修复3key5key页面不能自动聚焦的功能(感谢智明提供补丁)

2024/06/13
* 去掉不必要的参数有效性检查(感谢朝泽提供补丁)
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/default_focused_child.inc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static ret_t default_focused_child_set_target_focused(str_t* tag, widget_t* widg
if (target == target->parent->target) {
break;
}
pointer_event_init((event_t*)&event, EVT_POINTER_LEAVE, target->parent->target, ids->last_x, ids->last_y);
pointer_event_init(&event, EVT_POINTER_LEAVE, target->parent->target, ids->last_x, ids->last_y);
widget_dispatch_leave_event(target->parent->target, &event);

target->parent->target = target;
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/pages.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ static ret_t pages_save_target(widget_t* widget) {

static ret_t pages_on_idle_set_target_focused(const idle_info_t* idle) {
pages_t* pages = NULL;
system_info_t* info = system_info();
return_value_if_fail(idle != NULL, RET_BAD_PARAMS);
pages = PAGES(idle->ctx);
ENSURE(pages);

if (pages->widget.focused) {
if (pages->widget.focused || info->keyboard_type == KEYBOARD_3KEYS || info->keyboard_type == KEYBOARD_5KEYS) {
default_focused_child_set_target_focused(&(pages->str_target), WIDGET(pages));
}

Expand Down

0 comments on commit 45395c8

Please sign in to comment.