We should start by getting the remote end in sync with the actual
keyboard state. This would work randomly before depending on if we
got the first LED state message before or after we got focus.
#ifdef WIN32
altGrArmed(false),
#endif
+ firstLEDState(true),
pendingServerCutText(NULL), pendingClientCutText(NULL),
menuCtrlKey(false), menuAltKey(false), cursor(NULL)
{
{
vlog.debug("Got server LED state: 0x%08x", state);
+ // The first message is just considered to be the server announcing
+ // support for this extension, so start by pushing our state to the
+ // remote end to get things in sync
+ if (firstLEDState) {
+ firstLEDState = false;
+ pushLEDState();
+ return;
+ }
+
if (!hasFocus())
return;
unsigned int altGrCtrlTime;
#endif
+ bool firstLEDState;
+
const char* pendingServerCutText;
const char* pendingClientCutText;