Re: [PATCH RFC 0/1] an extensible SetUIInfo2 design

Marc-André Lureau <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <CAJ+F1CKxMw6FB1EsjfX8LT1GNm-a-PBHcproqyXrgvB0RbDwZA@mail.gmail.com>
Hi Chengyang

On Fri, Aug 7, 2026 at 4:12 PM Chengyang Zhu <[email protected]> wrote:
>
> Currently, the `SetUIInfo` method cannot set a refresh rate.
> Simply adding a refresh_rate argument would break the method signature.
>
> This RFC adds the `SetUIInfo2` method and `QemuUIInfoTypes` property.
>   * `SetUIInfo2` takes a dictionary,
>     allowing partial updates and adding more keys in the future.
>   * `QemuUIInfoTypes` exposes the schema of `SetUIInfo2`'s argument.
>
> This patch is a proof-of-concept and it needs further discussion on:
>   * public API design (the name and the signature)
>   * partial update behavior (only updating the recognized fields)
>   * error handling (ignore the wrong keys or return an error?)
>

It's an interesting design to use an extensible dict for arguments,
but it's not very idiomatic or discoverable by existing tools.

Instead, can we introduce an extra interface org.qemu.Display1.UIInfo
with the properties and an Apply() method that applies the staged
values?

> Test results:
>   * qemu:qtest-x86_64/dbus-display-test passed
>   * qemu:qtest-x86_64/dbus-vmstate-test passed
>   * qemu:qtest-x86_64/dbus-vnc-test SKIP
>   * manually created a virtual machine
>     and successfully set its refresh rate and resolution via `SetUIInfo2`
>
> Chengyang Zhu (1):
>   ui/dbus: add extensible SetUIInfo2 method
>
>  ui/dbus-console.c    | 56 ++++++++++++++++++++++++++++++++++++++++++++
>  ui/dbus-display1.xml | 17 ++++++++++++++
>  2 files changed, 73 insertions(+)
>
> --
> 2.55.0
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.