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.
diff --git a/common/rfb/SMsgHandler.cxx b/common/rfb/SMsgHandler.cxx
index f0e277c..be88433 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 @@
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();
}