usb-tablet support
G'day all,
This takes Anthony Liguori's <[email protected]> patch from this morning and rolls into it my hid descriptor fixes and the wheel sdl double step fix.
<quote from Anthonys original post>
I spent some time cleaning this all up. The following integrates Brad's patches and the patch from http://gnome.dnsalias.net/patches/qemu-hidmousexp.patch
It adds a new emulated USB device that reports absolute coordinates. It also modifies SDL to operate in grabless mode when an absolute input device is enabled. I think it's pretty close to apply-able. To use, just specify: -usbdevice tablet
With Xorg from CVS, the evdev driver segfaults. This is apparently expected behavior. Hopefully it will be fixed soon. It works quite nicely under Win2k.
</quote>
I've now comprehensively tested this with Win98, Win2k and WinXP. I suspect it's ready to go in.
Regards,
Brad
Signature · 3 lines
"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams
hw/ps2.c +1 -1
@@ -560,7 +560,7 @@ s->common.update_arg = update_arg;ps2_reset (&s->common);register_savevm ("ps2mouse" ,0 ,2 , ps2_mouse_save, ps2_mouse_load, s); -qemu_add_mouse_event_handler (ps2_mouse_event, s); +qemu_add_mouse_event_handler (ps2_mouse_event, s,0 );qemu_register_reset (ps2_reset, &s->common);return s; }
hw/usb.h +1 -0
@@ -163,3 +163,4 @@/* usb-hid.c */ USBDevice *usb_mouse_init (void ); +USBDevice *usb_tablet_init (void );
hw/usb-hid.c +205 -15
328 lines not on this page · raw message
sdl.c +44 -6
113 lines not on this page · raw message
vl.c +12 -1
@@ -474,6 +474,7 @@static void *qemu_put_kbd_event_opaque;static QEMUPutMouseEvent *qemu_put_mouse_event;static void *qemu_put_mouse_event_opaque; +static int qemu_put_mouse_event_absolute;void qemu_add_kbd_event_handler (QEMUPutKBDEvent *func,void *opaque) {
@@ -481,10 +482,11 @@ qemu_put_kbd_event = func; } -void qemu_add_mouse_event_handler (QEMUPutMouseEvent *func,void *opaque) +void qemu_add_mouse_event_handler (QEMUPutMouseEvent *func,void *opaque,int absolute) { qemu_put_mouse_event_opaque = opaque; qemu_put_mouse_event = func; + qemu_put_mouse_event_absolute = absolute; }void kbd_put_keycode (int keycode)
@@ -502,6 +504,11 @@ } } +int kbd_mouse_is_absolute (void ) +{ +return qemu_put_mouse_event_absolute; +} +/***********************************************************/ /* timers */
@@ -2855,6 +2862,10 @@ dev =usb_mouse_init ();if (!dev)return -1 ; + }else if (!strcmp (devname,"tablet" )) { + dev =usb_tablet_init (); +if (!dev) +return -1 ; }else {return -1 ; }
vl.h +2 -1
@@ -158,10 +158,11 @@typedef void QEMUPutMouseEvent (void *opaque,int dx,int dy,int dz,int buttons_state);void qemu_add_kbd_event_handler (QEMUPutKBDEvent *func,void *opaque); -void qemu_add_mouse_event_handler (QEMUPutMouseEvent *func,void *opaque); +void qemu_add_mouse_event_handler (QEMUPutMouseEvent *func,void *opaque,int absolute);void kbd_put_keycode (int keycode);void kbd_mouse_event (int dx,int dy,int dz,int buttons_state); +int kbd_mouse_is_absolute (void );/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx constants) */
Quoted 8 lines · Brad Campbell
G'day all,
This takes Anthony Liguori's <[email protected]> patch from this morning and rolls into it my hid descriptor fixes and the wheel sdl double step fix.
<quote from Anthonys original post>
I spent some time cleaning this all up. The following integrates Brad's patches and the patch from http://gnome.dnsalias.net/patches/qemu-hidmousexp.patch
Quoted 8 lines
It adds a new emulated USB device that reports absolute coordinates. It also modifies SDL to operate in grabless mode when an absolute input device is enabled. I think it's pretty close to apply-able. To use, just specify: -usbdevice tablet
With Xorg from CVS, the evdev driver segfaults. This is apparently expected behavior. Hopefully it will be fixed soon. It works quite nicely under Win2k.
</quote>
I've now comprehensively tested this with Win98, Win2k and WinXP. I suspect it's ready to go in.
OK. I'll merge the tablet patch and the VNC server support ASAP so that it will be in the next release. Thank you !
Fabrice.
Hello,
I'm a little late for the party, it seems...
...never the less: here comes the patch for cocoa.m
Tested with win2k and winXP.
This patch fixes the cocoa compile problem that was introduced with the multi-display-support as well.
Greetings
Mike