cli: Have '--input tablet' default to bus=usb (bz 1232087)
Make the default a little smarter in other ways too
This commit is contained in:
parent
2178cc8c93
commit
6d3b5e2838
|
@ -193,7 +193,7 @@
|
|||
<boot order="1"/>
|
||||
</interface>
|
||||
<input type="keyboard" bus="usb"/>
|
||||
<input type="tablet" bus="xen"/>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="sdl" display=":3.4" xauth="/tmp/.Xauthority"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<image compression="off"/>
|
||||
|
|
|
@ -477,8 +477,8 @@ c.add_compare(""" \
|
|||
--controller usb,model=ich9-uhci2,address=0:0:4.1,index=0,master=2 \
|
||||
--controller usb,model=ich9-uhci3,address=0:0:4.2,index=0,master=4 \
|
||||
\
|
||||
--input keyboard,bus=usb \
|
||||
--input type=tablet \
|
||||
--input type=keyboard,bus=usb \
|
||||
--input tablet \
|
||||
\
|
||||
--serial tcp,host=:2222,mode=bind,protocol=telnet \
|
||||
--parallel udp,host=0.0.0.0:1234,bind_host=127.0.0.1:1234 \
|
||||
|
|
|
@ -39,8 +39,15 @@ class VirtualInputDevice(VirtualDevice):
|
|||
type = XMLProperty("./@type",
|
||||
default_cb=lambda s: s.TYPE_MOUSE,
|
||||
default_name=TYPE_DEFAULT)
|
||||
|
||||
def _default_bus(self):
|
||||
if self.type == self.TYPE_TABLET:
|
||||
return self.BUS_USB
|
||||
if self.conn.is_xen():
|
||||
return self.BUS_XEN
|
||||
return self.BUS_PS2
|
||||
bus = XMLProperty("./@bus",
|
||||
default_cb=lambda s: s.BUS_XEN,
|
||||
default_cb=_default_bus,
|
||||
default_name=BUS_DEFAULT)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue