Hi Giulio,<br><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 8:03 AM, Giulio Camuffo <span dir="ltr"><<a href="mailto:giuliocamuffo@gmail.com" target="_blank">giuliocamuffo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/compositor.c | 24 +++++++++++++++++++-----<br>
1 file changed, 19 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index 64d0830..ec0329b 100644<br>
<div class="im">--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -776,6 +776,7 @@ weston_device_repick(struct weston_seat *seat)<br>
const struct wl_pointer_grab_interface *interface;<br>
struct weston_surface *surface, *focus;<br>
struct wl_pointer *pointer = seat->seat.pointer;<br>
+ int32_t curr_x, curr_y;<br>
<br>
if (!pointer)<br>
return;<br>
</div>@@ -783,16 +784,29 @@ weston_device_repick(struct weston_seat *seat)<br>
<div class="im"> surface = weston_compositor_pick_surface(seat->compositor,<br>
pointer->x,<br>
pointer->y,<br>
- &pointer->current_x,<br>
- &pointer->current_y);<br>
+ &curr_x,<br>
+ &curr_y);<br>
<br>
if (&surface->surface != pointer->current) {<br>
interface = pointer->grab->interface;<br>
pointer->current = &surface->surface;<br>
</div><div class="im"> interface->focus(pointer->grab, &surface->surface,<br>
</div>- pointer->current_x,<br>
- pointer->current_y);<br>
- }<br>
+ curr_x,<br>
+ curr_y);<br>
<div class="im">+ } else if (pointer->current_x != curr_x ||<br>
+ pointer->current_y != curr_y) {<br>
+ /* The current surface moved under the cursor, send<br>
</div>+ * a focus and a motion event. */<br></blockquote><div><br><br>Shouldn't we send an enter event with wl_surface_send_enter() instead?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ interface = pointer->grab->interface;<br>
+ interface->focus(pointer->grab, &surface->surface,<br>
+ curr_x,<br>
+ curr_y);<br>
+ interface->motion(pointer->grab, weston_compositor_get_time(),<br>
+ curr_x,<br>
+ curr_y);<br>
+ }<br>
<div class="im">+ pointer->current_x = curr_x;<br>
+ pointer->current_y = curr_y;<br>
<br>
</div><div class="im"> focus = (struct weston_surface *) pointer->grab->focus;<br>
</div> if (focus)<br>
<div class="HOEnZb"><div class="h5">--<br>
1.8.1.3<br>
<br><br></div></div></blockquote><div>- Scott <br></div></div><br>