[PATCH] input: add new client to resource_list instead of focus_resource_list

Chokshi, Mitul mitul.chokshi at intel.com
Fri Oct 9 01:28:47 PDT 2015


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.
---
 src/input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input.c b/src/input.c
index e230c83..38da624 100644
--- a/src/input.c
+++ b/src/input.c
@@ -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,
-- 
1.7.11.7

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.




More information about the wayland-devel mailing list