fix mledit soft keyboard return bug

This commit is contained in:
lixianjing 2019-10-09 15:25:44 +08:00
parent 83247c0d5a
commit df4111ea7c
5 changed files with 9 additions and 2 deletions

View File

@ -2,6 +2,7 @@
* 2019/10/09
* slider 的min/max/value/step使用浮动数。
* combo\_box 增加item\_height属性(感谢朝泽提供补丁)。
* 修改mledit软键盘回车的问题感谢俊杰提供补丁
* 2019/10/08
* 增加istream buffered。

View File

@ -90,7 +90,7 @@ ret_t input_method_dispatch_action(input_method_t* im) {
input_method_dispatch(im, &e);
if (im->engine != NULL && im->action_buton_text[0] == '\0') {
if (im->engine != NULL && im->engine->keys.size > 0) {
char text[64];
tk_strncpy(text, im->engine->keys.str, sizeof(text) - 1);
input_method_commit_text(im, text);

View File

@ -391,6 +391,10 @@ static ret_t mledit_on_event(widget_t* widget, event_t* e) {
mledit_update_status(widget);
break;
}
case EVT_IM_ACTION : {
mledit_commit_str(widget, "\n");
break;
}
case EVT_KEY_UP: {
break;
}

View File

@ -34,7 +34,7 @@ typedef struct _tk_iostream_mem_t tk_iostream_mem_t;
* @class tk_iostream_mem_t
* @parent tk_iostream_t
*
* input stream base on mem
* iostream base on mem
*
*/
struct _tk_iostream_mem_t {

View File

@ -554,6 +554,8 @@ float_t object_get_prop_float_by_path(object_t* obj, const char* path, float_t d
#define OBJECT(obj) ((object_t*)(obj))
#define OBJECT_UNREF(obj) if((obj) != NULL) { object_unref((object_t*)(obj)); (obj) = NULL; }
END_C_DECLS
#endif /*TK_OBJECT_H*/