diff options
author | Adam Halim <adaha@cendio.se> | 2024-09-24 15:55:21 +0200 |
---|---|---|
committer | Adam Halim <adaha@cendio.se> | 2024-10-22 14:52:31 +0200 |
commit | 63327145959e26193682e2b691a6027e26c1ce16 (patch) | |
tree | 772dcd8cc872bf7da5482cfaee33639cee924db4 /common/rfb/SMsgHandler.cxx | |
parent | 2fe9dca45f7d0a519fef5053ba61e2db7c1ff2b1 (diff) | |
download | tigervnc-63327145959e26193682e2b691a6027e26c1ce16.tar.gz tigervnc-63327145959e26193682e2b691a6027e26c1ce16.zip |
Add server support for forward/back mouse buttons
This commit adds support for the pseudo-encoding ExtendedMouseButtons in
Xvnc and x0vncserver, which makes it possible to use to use the
back/forward mouse buttons.
This commit contains work originally done by
PixelSmith <manny33@frontbuffer.com>.
Diffstat (limited to 'common/rfb/SMsgHandler.cxx')
-rw-r--r-- | common/rfb/SMsgHandler.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/rfb/SMsgHandler.cxx b/common/rfb/SMsgHandler.cxx index 03917926..1dce634d 100644 --- a/common/rfb/SMsgHandler.cxx +++ b/common/rfb/SMsgHandler.cxx @@ -53,12 +53,13 @@ void SMsgHandler::setPixelFormat(const PixelFormat& pf) void SMsgHandler::setEncodings(int nEncodings, const int32_t* encodings) { bool firstFence, firstContinuousUpdates, firstLEDState, - firstQEMUKeyEvent; + firstQEMUKeyEvent, firstExtMouseButtonsEvent; firstFence = !client.supportsFence(); firstContinuousUpdates = !client.supportsContinuousUpdates(); firstLEDState = !client.supportsLEDState(); firstQEMUKeyEvent = !client.supportsEncoding(pseudoEncodingQEMUKeyEvent); + firstExtMouseButtonsEvent = !client.supportsEncoding(pseudoEncodingExtendedMouseButtons); client.setEncodings(nEncodings, encodings); @@ -72,6 +73,8 @@ void SMsgHandler::setEncodings(int nEncodings, const int32_t* encodings) supportsLEDState(); if (client.supportsEncoding(pseudoEncodingQEMUKeyEvent) && firstQEMUKeyEvent) supportsQEMUKeyEvent(); + if (client.supportsEncoding(pseudoEncodingExtendedMouseButtons) && firstExtMouseButtonsEvent) + supportsExtendedMouseButtons(); } void SMsgHandler::keyEvent(uint32_t /*keysym*/, uint32_t /*keycode*/, @@ -80,7 +83,7 @@ void SMsgHandler::keyEvent(uint32_t /*keysym*/, uint32_t /*keycode*/, } void SMsgHandler::pointerEvent(const Point& /*pos*/, - uint8_t /*buttonMask*/) + uint16_t /*buttonMask*/) { } @@ -167,3 +170,7 @@ void SMsgHandler::supportsLEDState() void SMsgHandler::supportsQEMUKeyEvent() { } + +void SMsgHandler::supportsExtendedMouseButtons() +{ +}
\ No newline at end of file |