Patchwork [meta-fsl-arm,07/10] weston: Add patch for crashes on touch device without a pointer.

login
register
mail settings
Submitter Neena Busireddy
Date July 30, 2014, 9:26 p.m.
Message ID <1406755584-1506-8-git-send-email-neena.busireddy@freescale.com>
Download mbox | patch
Permalink /patch/76965/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Neena Busireddy - July 30, 2014, 9:26 p.m.
Signed-off-by: Neena Busireddy <neena.busireddy@freescale.com>
---
 ...top-shell-Don-t-assume-there-is-a-pointer.patch |   36 ++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 recipes-graphics/wayland/weston/0004-Desktop-shell-Don-t-assume-there-is-a-pointer.patch

Patch

diff --git a/recipes-graphics/wayland/weston/0004-Desktop-shell-Don-t-assume-there-is-a-pointer.patch b/recipes-graphics/wayland/weston/0004-Desktop-shell-Don-t-assume-there-is-a-pointer.patch
new file mode 100644
index 0000000..f6ef253
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0004-Desktop-shell-Don-t-assume-there-is-a-pointer.patch
@@ -0,0 +1,36 @@ 
+From 1194ccebc0db14ba681bd8272e01715b3e7008cc Mon Sep 17 00:00:00 2001
+From: Yong Gan <b45748@freescale.com>
+Date: Fri, 27 Jun 2014 11:33:53 +0800
+Subject: [PATCH] ENGR00320189 desktop-shell: Don't assume there is a pointer
+ when resizing
+
+Fixes a crash on touch devices without a pointer, when touching
+the window frame of a client.
+cherry-pick from 5872b6821be7c9c0a17a0de962e3f4a04f5d0c6f
+
+Date: Jun 27, 2014
+
+Upstream Status: N/A
+
+Signed-off-by Yong Gan <B45748@freescale.com>
+---
+ desktop-shell/shell.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
+index 84f5c83..d965618 100644
+--- a/desktop-shell/shell.c
++++ b/desktop-shell/shell.c
+@@ -1784,7 +1784,8 @@ common_surface_resize(struct wl_resource *resource,
+ 	struct shell_surface *shsurf = wl_resource_get_user_data(resource);
+ 	struct weston_surface *surface;
+ 
+-	if (seat->pointer->button_count == 0 ||
++	if (seat->pointer == NULL ||
++	    seat->pointer->button_count == 0 ||
+ 	    seat->pointer->grab_serial != serial ||
+ 	    seat->pointer->focus == NULL)
+ 		return;
+-- 
+1.7.9.5
+