From: Gerd Hoffmann <kraxel@redhat.com>
To: Lei Li <lilei@linux.vnet.ibm.com>
Cc: lagarcia@br.ibm.com, aliguori@us.ibm.com,
Laszlo Ersek <lersek@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] vnc: Support for LED state extension
Date: Wed, 15 May 2013 08:44:57 +0200 [thread overview]
Message-ID: <51932EE9.7050904@redhat.com> (raw)
In-Reply-To: <5193259F.9020803@linux.vnet.ibm.com>
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()
cheers,
Gerd
next prev parent reply other threads:[~2013-05-15 6:46 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 [this message]
2013-05-15 7:18 ` Lei Li
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=51932EE9.7050904@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=lagarcia@br.ibm.com \
--cc=lersek@redhat.com \
--cc=lilei@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).