Bladeren bron

Only do initial LED sync if focused

We always sync when we get focus, so this code path is really only
for when the server announces LED state support after we already
have focus.

Make sure we only handle this specific scenario as otherwise we
could end up syncing twice, which just toggles things back and forth
and ends up syncing incorrectly.
tags/v1.9.90
Pierre Ossman 5 jaren geleden
bovenliggende
commit
20634399bd
1 gewijzigde bestanden met toevoegingen van 5 en 3 verwijderingen
  1. 5
    3
      vncviewer/Viewport.cxx

+ 5
- 3
vncviewer/Viewport.cxx Bestand weergeven

@@ -323,11 +323,13 @@ void Viewport::setLEDState(unsigned int state)
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
// support for this extension. We will push our state to sync up the
// server when we get focus. If we already have focus we need to push
// it here though.
if (firstLEDState) {
firstLEDState = false;
pushLEDState();
if (hasFocus())
pushLEDState();
return;
}


Laden…
Annuleren
Opslaan