input: add new client to resource_list instead of focus_resource_list
authorChokshi, Mitul <mitul.chokshi@intel.com>
Fri, 9 Oct 2015 08:28:47 +0000 (08:28 +0000)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 9 Oct 2015 16:20:41 +0000 (11:20 -0500)
When new client registers touch listener, it was added to focus resource list.
At this point if another client "without" touch listener is in focus then
subsequent touch events are sent to new client with another client's resources
causing new client to stop rendering.
Now new client is added to resource list by default and it'll be added to focus
resource list only if its in focus.

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
src/input.c

index 2e5cd04731fe2753aef4b1c5a7cad9e2d5248e60..500c39ae20f2e36bab09fcde261d5873e3c545ca 100644 (file)
@@ -1934,10 +1934,10 @@ seat_get_touch(struct wl_client *client, struct wl_resource *resource,
 
        if (touch->focus &&
            wl_resource_get_client(touch->focus->surface->resource) == client) {
-               wl_list_insert(&touch->resource_list,
+               wl_list_insert(&touch->focus_resource_list,
                               wl_resource_get_link(cr));
        } else {
-               wl_list_insert(&touch->focus_resource_list,
+               wl_list_insert(&touch->resource_list,
                               wl_resource_get_link(cr));
        }
        wl_resource_set_implementation(cr, &touch_interface,