aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/VNCServerST.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-12-12 16:59:15 +0100
committerPierre Ossman <ossman@cendio.se>2017-08-24 12:38:05 +0200
commitb45a84f9531c3659364676af49d589fab060633b (patch)
tree256c47093a313284069399130512232235a204ac /common/rfb/VNCServerST.cxx
parentac94b50e634e50dbb507b01759678a526dda34a3 (diff)
downloadtigervnc-b45a84f9531c3659364676af49d589fab060633b.tar.gz
tigervnc-b45a84f9531c3659364676af49d589fab060633b.zip
Send lock LED state from server to client
Diffstat (limited to 'common/rfb/VNCServerST.cxx')
-rw-r--r--common/rfb/VNCServerST.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 28f6a62b..43e8f3ed 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -461,7 +461,17 @@ void VNCServerST::setCursorPos(const Point& pos)
void VNCServerST::setLEDState(unsigned int state)
{
+ std::list<VNCSConnectionST*>::iterator ci, ci_next;
+
+ if (state == ledState)
+ return;
+
ledState = state;
+
+ for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
+ ci_next = ci; ci_next++;
+ (*ci)->setLEDStateOrClose(state);
+ }
}
// Other public methods