diff --git a/AUTHORS b/AUTHORS index 4d383bc40f07c1c1c7560693696226036795e896..4f7dfa22aab5d24b525048dd327bbfbb472cc009 100644 --- a/AUTHORS +++ b/AUTHORS @@ -56,6 +56,7 @@ Patches have also been contributed by: Ben Guthro Shigeki Sakamoto Gerd von Egidy + Itamar Heim [....send patches to get your name here....] diff --git a/ChangeLog b/ChangeLog index 6cdc07a4ab6da3215688906fa0d7e71fa536a05f..000b66d056987c8684dacb821f4242cbb6a6792f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Thu Dec 11 12:39:20 CET 2008 Daniel Veillard + + * src/domain_conf.c src/domain_conf.h src/qemu_conf.c + tests/qemuxml2argvtest.c tests/qemuxml2xmltest.c + tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args + tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml: + slightly modified patch for SDL fullscreen from Itamar Heim + * docs/formatdomain.html docs/formatdomain.html.in docs/libvirt.rng: + update the schemas and docs about the sdl graphic element attributes + * AUTHORS: add Itamar Heim + Wed Dec 10 20:18:36 +0100 2008 Jim Meyering avoid a new "make distcheck" failure diff --git a/docs/formatdomain.html b/docs/formatdomain.html index 05e056c57b9284d1c42d864fdd27ddfee05a16a2..65a3566d283836751a6edfe963a4a155e5af325b 100644 --- a/docs/formatdomain.html +++ b/docs/formatdomain.html @@ -713,6 +713,10 @@ qemu-kvm -net nic,model=? /dev/null
graphics
The graphics element has a mandatory type attribute which takes the value "sdl" or "vnc". The former displays a window on the host desktop, while the latter activates a VNC server. + The former accepts 3 optional arguments: a display + attribute for the display to use, an xauth attribute for + the authentication identifier, and an optional fullscreen + attribute accepting values 'yes' or 'no'. If the latter is used the port attribute specifies the TCP port number (with -1 as legacy syntax indicating that it should be auto-allocated). The autoport attribute is the new diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 2482f4bf8ae43a5099304f3b061383c6e8307afb..6d531ce701646455cfad447de30aa5d4f9ce8784 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -657,6 +657,10 @@ qemu-kvm -net nic,model=? /dev/null
The graphics element has a mandatory type attribute which takes the value "sdl" or "vnc". The former displays a window on the host desktop, while the latter activates a VNC server. + The former accepts 3 optional arguments: a display + attribute for the display to use, an xauth attribute for + the authentication identifier, and an optional fullscreen + attribute accepting values 'yes' or 'no'. If the latter is used the port attribute specifies the TCP port number (with -1 as legacy syntax indicating that it should be auto-allocated). The autoport attribute is the new diff --git a/docs/libvirt.rng b/docs/libvirt.rng index fdc841506dd432f22c864bd0d2fd42182e4d11a8..52370640ea1f811244ebef224935ffff1ed2fbb0 100644 --- a/docs/libvirt.rng +++ b/docs/libvirt.rng @@ -638,7 +638,7 @@ @@ -659,6 +659,14 @@ + + + + yes + no + + + diff --git a/src/domain_conf.c b/src/domain_conf.c index 32ed59fcd2aa9bdd83357eb14488f2aa5bc3eb87..485ffb2436425344d4a989ab86622d3d624b34f4 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -1401,6 +1401,22 @@ virDomainGraphicsDefParseXML(virConnectPtr conn, def->data.vnc.passwd = virXMLPropString(node, "passwd"); def->data.vnc.keymap = virXMLPropString(node, "keymap"); } else if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) { + char *fullscreen = virXMLPropString(node, "fullscreen"); + + if (fullscreen != NULL) { + if (STREQ(fullscreen, "yes")) { + def->data.sdl.fullscreen = 1; + } else if (STREQ(fullscreen, "no")) { + def->data.sdl.fullscreen = 0; + } else { + virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, + _("unknown fullscreen value '%s'"), fullscreen); + VIR_FREE(fullscreen); + goto error; + } + VIR_FREE(fullscreen); + } else + def->data.sdl.fullscreen = 0; def->data.sdl.xauth = virXMLPropString(node, "xauth"); def->data.sdl.display = virXMLPropString(node, "display"); } @@ -2951,6 +2967,9 @@ virDomainGraphicsDefFormat(virConnectPtr conn, if (def->data.sdl.xauth) virBufferEscapeString(buf, " xauth='%s'", def->data.sdl.xauth); + if (def->data.sdl.fullscreen) + virBufferAddLit(buf, " fullscreen='yes'"); + break; } diff --git a/src/domain_conf.h b/src/domain_conf.h index 51cf6d56d51ba69c81431b1df0e5d7ed93b04afa..d6029ee3f9d4de3a91f4711c07bcf6b32d1b17b9 100644 --- a/src/domain_conf.h +++ b/src/domain_conf.h @@ -268,6 +268,7 @@ struct _virDomainGraphicsDef { struct { char *display; char *xauth; + int fullscreen; } sdl; } data; }; diff --git a/src/qemu_conf.c b/src/qemu_conf.c index e6c378f40f9c266698a02e0699adfd7a603864d1..3b846a3e198e5eca938771b2ef7b6928802ec988 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -1229,6 +1229,8 @@ int qemudBuildCommandLine(virConnectPtr conn, ADD_ENV(xauth); if (display) ADD_ENV(display); + if (vm->def->graphics->data.sdl.fullscreen) + ADD_ARG_LIT("-full-screen"); } /* Add sound hardware */ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args new file mode 100644 index 0000000000000000000000000000000000000000..da2adc0c646cc1e79608e3d24944ee3f940f3c93 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.args @@ -0,0 +1 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test XAUTHORITY=/root/.Xauthority DISPLAY=:0.1 /usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -full-screen diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe1fe1acaf6e70d7c16f9d164b558940f083c350 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml @@ -0,0 +1,24 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219200 + 219200 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6e5355a5248bfceaa360b51428ddb71c34b171b9..a04d508fdf1324a9063e896950a4fa48cbd55bc8 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -195,6 +195,7 @@ mymain(int argc, char **argv) DO_TEST("disk-usb", 0); DO_TEST("graphics-vnc", 0); DO_TEST("graphics-sdl", 0); + DO_TEST("graphics-sdl-fullscreen", 0); DO_TEST("input-usbmouse", 0); DO_TEST("input-usbtablet", 0); DO_TEST("input-xen", 0); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c810f78339e8fe1d003e5beb30933fc5a58555a8..613926ab6ced961ed945b3501c0be21b4603e04b 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -98,6 +98,7 @@ mymain(int argc, char **argv) DO_TEST("disk-usb"); DO_TEST("graphics-vnc"); DO_TEST("graphics-sdl"); + DO_TEST("graphics-sdl-fullscreen"); DO_TEST("input-usbmouse"); DO_TEST("input-usbtablet"); DO_TEST("input-xen");