<br><br><div class="gmail_quote">On Thu, Feb 21, 2013 at 8:17 AM, Scott Moreau <span dir="ltr"><<a href="mailto:oreaus@gmail.com" target="_blank">oreaus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Giulio,<br><br><div class="gmail_quote"><div><div class="h5">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>--- 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>        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>                interface->focus(pointer->grab, &surface->surface,<br>
</div>-                                pointer->current_x,<br>
-                                pointer->current_y);<br>
-       }<br>
+                                curr_x,<br>
+                                curr_y);<br>
<div>+       } 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></div><div><br><br>Shouldn't we send an enter event with wl_surface_send_enter() instead?<br></div></div></blockquote><div><br>Actually, wl_surface_send_enter() is sent when a surface enters an output. I meant wl_pointer_send_enter() which is called internally by libwayland in wl_pointer_set_focus().<br>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div> </div><div class="im"><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>+       pointer->current_x = curr_x;<br>
+       pointer->current_y = curr_y;<br>
<br>
</div><div>        focus = (struct weston_surface *) pointer->grab->focus;<br>
</div>        if (focus)<br>
<div><div>--<br>
1.8.1.3<br>
<br><br></div></div></blockquote></div><span class="HOEnZb"><font color="#888888"><div>- Scott <br></div></font></span></div><br>
</blockquote></div><br>