BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
563411a3
Commit
563411a3
authored
Apr 03, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_indev: drag test use absolute coosdinates
parent
9f72ca23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lv_indev.c
lv_core/lv_indev.c
+5
-1
No files found.
lv_core/lv_indev.c
View file @
563411a3
...
@@ -655,10 +655,14 @@ static void indev_drag(lv_indev_proc_t * state)
...
@@ -655,10 +655,14 @@ static void indev_drag(lv_indev_proc_t * state)
lv_coord_t
act_y
=
lv_obj_get_y
(
drag_obj
);
lv_coord_t
act_y
=
lv_obj_get_y
(
drag_obj
);
uint16_t
inv_buf_size
=
lv_refr_get_buf_size
();
/*Get the number of currently invalidated areas*/
uint16_t
inv_buf_size
=
lv_refr_get_buf_size
();
/*Get the number of currently invalidated areas*/
lv_coord_t
prev_x
=
drag_obj
->
coords
.
x1
;
lv_coord_t
prev_y
=
drag_obj
->
coords
.
y1
;
lv_obj_set_pos
(
drag_obj
,
act_x
+
state
->
vect
.
x
,
act_y
+
state
->
vect
.
y
);
lv_obj_set_pos
(
drag_obj
,
act_x
+
state
->
vect
.
x
,
act_y
+
state
->
vect
.
y
);
/*Set the drag in progress flag if the object is really moved*/
/*Set the drag in progress flag if the object is really moved*/
if
(
lv_obj_get_x
(
drag_obj
)
!=
act_x
||
lv_obj_get_y
(
drag_obj
)
!=
act_y
)
{
if
(
drag_obj
->
coords
.
x1
!=
prev_x
||
drag_obj
->
coords
.
y1
!=
prev_y
)
{
if
(
state
->
drag_range_out
!=
0
)
{
/*Send the drag begin signal on first move*/
if
(
state
->
drag_range_out
!=
0
)
{
/*Send the drag begin signal on first move*/
drag_obj
->
signal_func
(
drag_obj
,
LV_SIGNAL_DRAG_BEGIN
,
indev_act
);
drag_obj
->
signal_func
(
drag_obj
,
LV_SIGNAL_DRAG_BEGIN
,
indev_act
);
if
(
state
->
reset_query
!=
0
)
return
;
if
(
state
->
reset_query
!=
0
)
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment