All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] VNC LED state buggy, interop issue
@ 2016-12-10 15:30 Pierre Ossman
  2016-12-12  9:11 ` Pierre Ossman
  2016-12-13  8:06 ` Gerd Hoffmann
  0 siblings, 2 replies; 9+ messages in thread
From: Pierre Ossman @ 2016-12-10 15:30 UTC (permalink / raw)
  To: qemu-devel

Hi,

I'm working on adding support for the LED state extension in TigerVNC. 
Unfortunately I discovered some bugs in the QEMU implementation so I 
need to discuss with you guys what the proper behaviour should be.

The basic problem is that the code right now assumes that XK_Caps_Lock 
and XK_Num_Lock will toggle their respective states. It is however not 
assumed that XK_Scroll_Lock toggles any state.

This assumption can of course be wrong. Simply run this in your guest to 
break things:

   xmodmap -e 'clear mod2'

Pressing NumLock will now toggle the LED and state on the client side 
(that's what is assumed), but not on the server side. However the client 
is never informed by the server that things are out of sync.

There are two ways to fix this:

  a) Send an update to the client when the assumption doesn't hold. This 
will most likely be difficult in your case since there is no definite 
point where you can assume a LED change event should have occurred.

  b) Remove the assumption from the code and the protocol.

My vote is for b). Assumptions and side effects are rarely a good idea. 
The downside though is that it will break compatibility with older 
versions of QEMU.

Regards
-- 
Pierre Ossman           Software Development
Cendio AB		http://cendio.com
Teknikringen 8		http://twitter.com/ThinLinc
583 30 Linköping	http://facebook.com/ThinLinc
Phone: +46-13-214600	http://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Qemu-devel] VNC LED state buggy, interop issue
@ 2016-12-10 15:07 Pierre Ossman
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre Ossman @ 2016-12-10 15:07 UTC (permalink / raw)
  To: qemu-devel

Hi,

I'm working on adding support for the LED state extension in TigerVNC. 
Unfortunately I discovered some bugs in the QEMU implementation so I 
need to discuss with you guys what the proper behaviour should be.

The basic problem is that the code right now assumes that XK_Caps_Lock 
and XK_Num_Lock will toggle their respective states. It is however not 
assumed that XK_Scroll_Lock toggles any state.

This assumption can of course be wrong. Simply run this in your guest to 
break things:

   xmodmap -e 'clear mod2'

Pressing NumLock will now toggle the LED and state on the client side 
(that's what is assumed), but not on the server side. However the client 
is never informed by the server that things are out of sync.

There are two ways to fix this:

  a) Send an update to the client when the assumption doesn't hold. This 
will most likely be difficult in your case since there is no definite 
point where you can assume a LED change event should have occurred.

  b) Remove the assumption from the code and the protocol.

My vote is for b). Assumptions and side effects are rarely a good idea. 
The downside though is that it will break compatibility with older 
versions of QEMU.

Regards
-- 
Pierre Ossman           Software Development
Cendio AB		http://cendio.com
Teknikringen 8		http://twitter.com/ThinLinc
583 30 Linköping	http://facebook.com/ThinLinc
Phone: +46-13-214600	http://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-14  7:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-10 15:30 [Qemu-devel] VNC LED state buggy, interop issue Pierre Ossman
2016-12-12  9:11 ` Pierre Ossman
2016-12-13  8:06 ` Gerd Hoffmann
2016-12-13 13:10   ` Pierre Ossman
2016-12-13 13:15     ` Daniel P. Berrange
2016-12-13 13:37       ` Pierre Ossman
2016-12-13 14:44       ` Pierre Ossman
2016-12-14  7:31     ` Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2016-12-10 15:07 Pierre Ossman

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.