[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] spice_info: add mouse_mode
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH] spice_info: add mouse_mode |
Date: |
Mon, 26 Mar 2012 15:46:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120307 Thunderbird/10.0.3 |
On 03/26/12 15:30, Alon Levy wrote:
> On Mon, Mar 26, 2012 at 03:06:22PM +0200, Gerd Hoffmann wrote:
>>> +#if SPICE_SERVER_VERSION >= 0x000a03 /* 0.10.3 */
>>> + info->has_mouse_mode = true;
>>> + info->mouse_mode = g_strdup(spice_server_is_server_mouse(spice_server)
>>> ?
>>> + "server" :
>>> "client");
>>
>> #else
>> info->mouse_mode = "unknown";
>> #endif
>
> Why?
has_mouse_mode looks superfluous and makes the code a bit more
complicated than needed.
> I don't set has_mouse_mode in this case, which defaults to 0 ==
> false because of the malloc0, and then I check has_mouse_mode in the hmp
> command, and the qmp just won't send the field because has == false.
Ah, ok, didn't see qmp does something different, then I'd suggest to
just leave mouse_mode zero-initialized (aka NULL) when mouse mode info
isn't available.
cheers,
Gerd
- [Qemu-devel] [PATCH qemu+spice] expose server mouse status, Alon Levy, 2012/03/26
- [Qemu-devel] [PATCH] server: export spice_server_is_server_mouse predicate, Alon Levy, 2012/03/26
- [Qemu-devel] [PATCH] spice_info: add mouse_mode, Alon Levy, 2012/03/26
- [Qemu-devel] [PATCH v2] spice_info: add mouse_mode, Alon Levy, 2012/03/26
- Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode, Anthony Liguori, 2012/03/29
- Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode, Alon Levy, 2012/03/29
- [Qemu-devel] [PATCH v3] spice_info: add mouse_mode, Alon Levy, 2012/03/29
- Re: [Qemu-devel] [PATCH v3] spice_info: add mouse_mode, Gerd Hoffmann, 2012/03/30
- Re: [Qemu-devel] [PATCH v3] spice_info: add mouse_mode, Alon Levy, 2012/03/30
Re: [Qemu-devel] [Spice-devel] [PATCH qemu+spice] expose server mouse status, Arnon Gilboa, 2012/03/26