diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-06-18 16:34:16 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-11-01 16:11:42 +0100 |
commit | b114f5cfb7b792fa6b1c943fcc78f6e8c146b742 (patch) | |
tree | 8434eacd4556b0510051c3ecef445aa675f94fa6 /common/rfb/SMsgHandler.cxx | |
parent | a114c343bc63a8fb11bc78ba5e40dd0963d24357 (diff) | |
download | tigervnc-b114f5cfb7b792fa6b1c943fcc78f6e8c146b742.tar.gz tigervnc-b114f5cfb7b792fa6b1c943fcc78f6e8c146b742.zip |
Remove indirect capability attributes
Better to check the actual list of supported encodings directly.
Makes parts more readable, and no risk of getting out of sync.
Diffstat (limited to 'common/rfb/SMsgHandler.cxx')
-rw-r--r-- | common/rfb/SMsgHandler.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/common/rfb/SMsgHandler.cxx b/common/rfb/SMsgHandler.cxx index f0e277ce..be884333 100644 --- a/common/rfb/SMsgHandler.cxx +++ b/common/rfb/SMsgHandler.cxx @@ -19,6 +19,7 @@ #include <rfb/Exception.h> #include <rfb/SMsgHandler.h> #include <rfb/ScreenSet.h> +#include <rfb/encodings.h> using namespace rfb; @@ -44,22 +45,22 @@ void SMsgHandler::setEncodings(int nEncodings, const rdr::S32* encodings) bool firstFence, firstContinuousUpdates, firstLEDState, firstQEMUKeyEvent; - firstFence = !client.supportsFence; - firstContinuousUpdates = !client.supportsContinuousUpdates; - firstLEDState = !client.supportsLEDState; - firstQEMUKeyEvent = !client.supportsQEMUKeyEvent; + firstFence = !client.supportsFence(); + firstContinuousUpdates = !client.supportsContinuousUpdates(); + firstLEDState = !client.supportsLEDState(); + firstQEMUKeyEvent = !client.supportsEncoding(pseudoEncodingQEMUKeyEvent); client.setEncodings(nEncodings, encodings); supportsLocalCursor(); - if (client.supportsFence && firstFence) + if (client.supportsFence() && firstFence) supportsFence(); - if (client.supportsContinuousUpdates && firstContinuousUpdates) + if (client.supportsContinuousUpdates() && firstContinuousUpdates) supportsContinuousUpdates(); - if (client.supportsLEDState && firstLEDState) + if (client.supportsLEDState() && firstLEDState) supportsLEDState(); - if (client.supportsQEMUKeyEvent && firstQEMUKeyEvent) + if (client.supportsEncoding(pseudoEncodingQEMUKeyEvent) && firstQEMUKeyEvent) supportsQEMUKeyEvent(); } |