summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch b/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
new file mode 100644
index 0000000000..b8210db2b1
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-0.13.0/wacom-tablet-fix.patch
@@ -0,0 +1,65 @@
1qemu 0.13.0 cause seg fault in qemu_remove_mouse_event_handler, this patch from
2upstream can fix it.
3
4Should remove it in next upgrade if necessary.
5
6Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
7
8commit b2d4d8329963b13c5cebe5944dcc99f0e9d1b5c7
9Author: Gerd Hoffmann <kraxel@redhat.com>
10Date: Fri Oct 8 12:30:14 2010 +0200
11
12 wacom tablet: activate event handlers.
13
14 Add qemu_activate_mouse_event_handler() calls to the usb wavom tablet so
15 it actually receives events. Also make sure we only remove the handler
16 if we registered it before.
17
18 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
19 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
20
21Index: qemu-0.13.0/hw/usb-wacom.c
22===================================================================
23--- qemu-0.13.0.orig/hw/usb-wacom.c 2010-10-16 04:56:09.000000000 +0800
24+++ qemu-0.13.0/hw/usb-wacom.c 2011-01-18 16:58:44.000000000 +0800
25@@ -160,6 +160,7 @@
26 if (!s->mouse_grabbed) {
27 s->eh_entry = qemu_add_mouse_event_handler(usb_mouse_event, s, 0,
28 "QEMU PenPartner tablet");
29+ qemu_activate_mouse_event_handler(s->eh_entry);
30 s->mouse_grabbed = 1;
31 }
32
33@@ -197,6 +198,7 @@
34 if (!s->mouse_grabbed) {
35 s->eh_entry = qemu_add_mouse_event_handler(usb_wacom_event, s, 1,
36 "QEMU PenPartner tablet");
37+ qemu_activate_mouse_event_handler(s->eh_entry);
38 s->mouse_grabbed = 1;
39 }
40
41@@ -334,8 +336,10 @@
42 ret = 0;
43 break;
44 case WACOM_SET_REPORT:
45- qemu_remove_mouse_event_handler(s->eh_entry);
46- s->mouse_grabbed = 0;
47+ if (s->mouse_grabbed) {
48+ qemu_remove_mouse_event_handler(s->eh_entry);
49+ s->mouse_grabbed = 0;
50+ }
51 s->mode = data[0];
52 ret = 0;
53 break;
54@@ -397,7 +401,10 @@
55 {
56 USBWacomState *s = (USBWacomState *) dev;
57
58- qemu_remove_mouse_event_handler(s->eh_entry);
59+ if (s->mouse_grabbed) {
60+ qemu_remove_mouse_event_handler(s->eh_entry);
61+ s->mouse_grabbed = 0;
62+ }
63 }
64
65 static int usb_wacom_initfn(USBDevice *dev)