From: Lei Li <lilei@linux.vnet.ibm.com>
To: Gerd Hoffmann <kraxel@redhat.com>, Laszlo Ersek <lersek@redhat.com>
Cc: lagarcia@br.ibm.com, aliguori@us.ibm.com,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/4] vnc: Support for LED state extension
Date: Wed, 15 May 2013 15:18:16 +0800 [thread overview]
Message-ID: <519336B8.4000507@linux.vnet.ibm.com> (raw)
In-Reply-To: <51932EE9.7050904@redhat.com>
On 05/15/2013 02:44 PM, Gerd Hoffmann wrote:
> On 05/15/13 08:05, Lei Li wrote:
>> On 05/14/2013 07:35 PM, Gerd Hoffmann wrote:
>>> On 04/25/13 07:29, Lei Li wrote:
>>>> + /* Sending the current led state message to the client */
>>>> + if (ledstate != current_led_state(vs)) {
>>>> + vnc_led_state_change(vs);
>>>> + }
>>> This check never becomes true as the vnc modifier/led state just got
>>> updated to match ledstate ...
>> Oh... then how about get rid of this check, let vnc_led_state_change send
>> the current led state message directly?
> Only sending an update if something did actually change makes sense I
> think, but you need to check before updating the state, i.e. something
> like this:
>
> bool has_changed = ledstate != current_led_state(vs);
>
> [ update modifiers/led state ]
>
> if (has_changed)
> vnc_led_state_change()
I see. Thanks for your very good suggestions!
I'll send the fix soon.
> cheers,
> Gerd
>
>
--
Lei
next prev parent reply other threads:[~2013-05-15 7:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 5:29 [Qemu-devel] [PATCH 0/4 v4] Support for LED state extension to Qemu VNC server Lei Li
2013-04-25 5:29 ` [Qemu-devel] [PATCH 1/4] vnc: Add SCROLL lock key to kbd_leds Lei Li
2013-04-25 5:29 ` [Qemu-devel] [PATCH 2/4] vnc: Support for LED state extension Lei Li
2013-05-14 11:35 ` Gerd Hoffmann
2013-05-15 6:05 ` Lei Li
2013-05-15 6:44 ` Gerd Hoffmann
2013-05-15 7:18 ` Lei Li [this message]
2013-05-15 6:46 ` Laszlo Ersek
2013-04-25 5:29 ` [Qemu-devel] [PATCH 3/4] vnc: Adjust lock state sync logic with VNC_FEATURE_LED_STATE Lei Li
2013-04-25 5:29 ` [Qemu-devel] [PATCH 4/4] doc: document the Pseudo-encoding of LED state Lei Li
2013-04-25 19:40 ` [Qemu-devel] [PATCH 0/4 v4] Support for LED state extension to Qemu VNC server Anthony Liguori
2013-04-29 22:04 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=519336B8.4000507@linux.vnet.ibm.com \
--to=lilei@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=kraxel@redhat.com \
--cc=lagarcia@br.ibm.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.