projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c72f57
)
input: Transform to surface coordinates outside resource for loop
author
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 5 Feb 2014 06:12:29 +0000
(22:12 -0800)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 5 Feb 2014 21:36:02 +0000
(13:36 -0800)
When we send the pointer motion event, the transform from compositor to
surface coordinates doesn't depend on the resource. Transform the
coordinates up front instead of everytime we send to a resource.
src/input.c
patch
|
blob
|
history
diff --git
a/src/input.c
b/src/input.c
index
d0f7fdf
..
1000192
100644
(file)
--- a/
src/input.c
+++ b/
src/input.c
@@
-172,11
+172,11
@@
default_grab_pointer_motion(struct weston_pointer_grab *grab, uint32_t time,
weston_pointer_move(pointer, x, y);
+ if (pointer->focus)
+ weston_view_from_global_fixed(pointer->focus,
+ pointer->x, pointer->y, &sx, &sy);
resource_list = &pointer->focus_resource_list;
wl_resource_for_each(resource, resource_list) {
- weston_view_from_global_fixed(pointer->focus,
- pointer->x, pointer->y,
- &sx, &sy);
wl_pointer_send_motion(resource, time, sx, sy);
}
}