]> git.proxmox.com Git - mirror_qemu.git/commit
ui/console: eliminate QOM properties from qemu_console_is_multihead()
authorLaszlo Ersek <lersek@redhat.com>
Wed, 13 Sep 2023 14:49:58 +0000 (16:49 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 3 Oct 2023 11:04:56 +0000 (15:04 +0400)
commit2c0c4c1f650d48c814df5a8b48544ea44918bd8f
treebb5150f85beded727f47796236cd05400c53a63b
parent4ce2f97c000629531553328e1871b56312a210cf
ui/console: eliminate QOM properties from qemu_console_is_multihead()

According to Marc-André's and Gerd's descriptions, the "device" and
"head" members of QemuGraphicConsole are exposed as QOM properties for two
purposes:

(1) Introspection (e.g., "qom-get" monitor command).

(2) A VNC server can display a specific device + head. This lets us run a
    multihead configuration by using multiple VNC servers (one for each
    head).

    Further, we can link input devices to device + head, so input events
    are routed to different devices dependent on where they are coming
    from. Which is most useful for tablet devices in a VNC multihead
    setup, each head has its own tablet device then. This does requires
    manual guest-side configuration, for establishing the same tablet <->
    head relationship.

However, neither goal seems to justify the complicated QOM property lookup
that's internal to qemu_console_is_multihead().

Rework qemu_console_is_multihead() with plain old C language field
accesses.

Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> (odd fixer:Graphics)
Cc: Gerd Hoffmann <kraxel@redhat.com> (odd fixer:Graphics)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230913144959.41891-4-lersek@redhat.com>
ui/console.c