<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>--- 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></blockquote><div><br>As Kristian pointed out, it is already setting focus here<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
</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>
+ 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></blockquote><div>or here. This patch should be good, sorry for the noise.<br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ 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>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br>