mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Adding support for SDL fullscreen option
* 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 Daniel
This commit is contained in:
parent
bd0af10802
commit
a3d570c7b9
1
AUTHORS
1
AUTHORS
@ -56,6 +56,7 @@ Patches have also been contributed by:
|
||||
Ben Guthro <bguthro@virtualiron.com>
|
||||
Shigeki Sakamoto <fj0588di@aa.jp.fujitsu.com>
|
||||
Gerd von Egidy <lists@egidy.de>
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Thu Dec 11 12:39:20 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* 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 <meyering@redhat.com>
|
||||
|
||||
avoid a new "make distcheck" failure
|
||||
|
@ -713,6 +713,10 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<dl><dt><code>graphics</code></dt><dd>The <code>graphics</code> element has a mandatory <code>type</code>
|
||||
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 <code>display</code>
|
||||
attribute for the display to use, an <code>xauth</code> attribute for
|
||||
the authentication identifier, and an optional <code>fullscreen</code>
|
||||
attribute accepting values 'yes' or 'no'.
|
||||
If the latter is used the <code>port</code> attribute specifies the TCP
|
||||
port number (with -1 as legacy syntax indicating that it should be
|
||||
auto-allocated). The <code>autoport</code> attribute is the new
|
||||
|
@ -657,6 +657,10 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
<dd>The <code>graphics</code> element has a mandatory <code>type</code>
|
||||
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 <code>display</code>
|
||||
attribute for the display to use, an <code>xauth</code> attribute for
|
||||
the authentication identifier, and an optional <code>fullscreen</code>
|
||||
attribute accepting values 'yes' or 'no'.
|
||||
If the latter is used the <code>port</code> attribute specifies the TCP
|
||||
port number (with -1 as legacy syntax indicating that it should be
|
||||
auto-allocated). The <code>autoport</code> attribute is the new
|
||||
|
@ -638,7 +638,7 @@
|
||||
|
||||
<!--
|
||||
A graphic description, currently in Xen only 2 types are supported:
|
||||
- sdl without arguments
|
||||
- sdl with optional display, xauth and fullscreen
|
||||
- vnc with a required port and optional listen IP address, password
|
||||
and keymap
|
||||
-->
|
||||
@ -659,6 +659,14 @@
|
||||
<text/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name='fullscreen'>
|
||||
<choice>
|
||||
<value>yes</value>
|
||||
<value>no</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<attribute name='type'>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -268,6 +268,7 @@ struct _virDomainGraphicsDef {
|
||||
struct {
|
||||
char *display;
|
||||
char *xauth;
|
||||
int fullscreen;
|
||||
} sdl;
|
||||
} data;
|
||||
};
|
||||
|
@ -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 */
|
||||
|
@ -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
|
@ -0,0 +1,24 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory>219200</memory>
|
||||
<currentMemory>219200</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os>
|
||||
<type arch='i686' machine='pc'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu</emulator>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
</disk>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
|
||||
</devices>
|
||||
</domain>
|
@ -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);
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user