Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2017-01-10 Thread Gerd Hoffmann
On Mo, 2017-01-09 at 17:14 +0100, Pierre Ossman wrote: > Piggy-backing on the modifier state array made it difficult to send > out updates at the proper times. > > Signed-off-by: Pierre Ossman Added to ui queue. thanks, Gerd

Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2017-01-09 Thread Pierre Ossman
On 04/01/17 09:57, Gerd Hoffmann wrote: /me wonders how you've tested the patch ... That would be not at all. Or rather, just a compile. :) Tried, but checkpatch found some more issues: Fixed. New patch incoming. Regards -- Pierre Ossman Software Development Cendio AB

[Qemu-devel] [PATCH] vnc: track LED state separately

2017-01-09 Thread Pierre Ossman
Piggy-backing on the modifier state array made it difficult to send out updates at the proper times. Signed-off-by: Pierre Ossman --- ui/vnc.c | 59 --- ui/vnc.h | 3 ++- 2 files changed, 18 insertions(+), 44 deletions(-) diff --git a/ui/

Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2017-01-04 Thread Gerd Hoffmann
On Fr, 2016-12-16 at 10:00 +0100, Pierre Ossman wrote: > On 15/12/16 17:41, Gerd Hoffmann wrote: > >> > >> -caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; > >> -num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; > >> -scr = ledstate & QEMU_SCROLL_LOCK_LED ? 1 : 0; > >> +if (ledstate != v

Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2016-12-16 Thread Pierre Ossman
On 15/12/16 17:41, Gerd Hoffmann wrote: -caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; -num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; -scr = ledstate & QEMU_SCROLL_LOCK_LED ? 1 : 0; +if (ledstate != vd->ledstate) +return; Hmm? Shouldn't that be (ledstate == vd->ledsta

Re: [Qemu-devel] [PATCH] vnc: track LED state separately

2016-12-15 Thread Gerd Hoffmann
On Do, 2016-12-15 at 14:16 +0100, Pierre Ossman wrote: > Piggy-backing on the modifier state array made it difficult to send > out updates at the proper times. So keep track of the LED state in > a separate variable. > > This also moves the handling up a layer in to the VNC Display object > since

[Qemu-devel] [PATCH] vnc: track LED state separately

2016-12-15 Thread Pierre Ossman
Piggy-backing on the modifier state array made it difficult to send out updates at the proper times. So keep track of the LED state in a separate variable. This also moves the handling up a layer in to the VNC Display object since the state is global, and also makes sure the state is readily avail