fix screen copy
This commit is contained in:
@@ -881,8 +881,8 @@ static void indev_proc_release(lv_indev_proc_t * proc)
|
||||
lv_group_t * g = lv_obj_get_group(proc->types.pointer.act_obj);
|
||||
|
||||
/*Check, if the parent is in a group focus on it.*/
|
||||
if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) ==
|
||||
false) { /*Respect the click focus protection*/
|
||||
/*Respect the click focus protection*/
|
||||
if(lv_obj_is_protected(proc->types.pointer.act_obj, LV_PROTECT_CLICK_FOCUS) == false) {
|
||||
lv_obj_t * parent = proc->types.pointer.act_obj;
|
||||
|
||||
while(g == NULL) {
|
||||
|
||||
@@ -359,7 +359,12 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
||||
}
|
||||
#endif
|
||||
|
||||
lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy));
|
||||
/*Set the same coordinates for non screen objects*/
|
||||
if(lv_obj_get_parent(copy) != NULL) {
|
||||
lv_obj_set_pos(new_obj, lv_obj_get_x(copy), lv_obj_get_y(copy));
|
||||
} else {
|
||||
lv_obj_set_pos(new_obj, 0, 0);
|
||||
}
|
||||
|
||||
LV_LOG_INFO("Object create ready");
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ void * lv_mem_alloc(uint32_t size)
|
||||
#endif
|
||||
void * alloc = NULL;
|
||||
|
||||
#if LV_MEM_CUSTOM == 0 /*Use the allocation from dyn_mem*/
|
||||
|
||||
#if LV_MEM_CUSTOM == 0
|
||||
/*Use the built-in allocators*/
|
||||
lv_mem_ent_t * e = NULL;
|
||||
|
||||
// Search for a appropriate entry
|
||||
@@ -141,7 +143,8 @@ void * lv_mem_alloc(uint32_t size)
|
||||
// End if there is not next entry OR the alloc. is successful
|
||||
} while(e != NULL && alloc == NULL);
|
||||
|
||||
#else /*Use custom, user defined malloc function*/
|
||||
#else
|
||||
/*Use custom, user defined malloc function*/
|
||||
#if LV_ENABLE_GC == 1 /*gc must not include header*/
|
||||
alloc = LV_MEM_CUSTOM_ALLOC(size);
|
||||
#else /* LV_ENABLE_GC */
|
||||
@@ -150,6 +153,7 @@ void * lv_mem_alloc(uint32_t size)
|
||||
if(alloc != NULL) {
|
||||
((lv_mem_ent_t *)alloc)->header.s.d_size = size;
|
||||
((lv_mem_ent_t *)alloc)->header.s.used = 1;
|
||||
|
||||
alloc = &((lv_mem_ent_t *)alloc)->first_data;
|
||||
}
|
||||
#endif /* LV_ENABLE_GC */
|
||||
|
||||
Reference in New Issue
Block a user