needQEMUKeyEvent = true;
}
- throw Exception("Client does not support Extended Mouse Buttons");
+ void SMsgWriter::writeExtendedMouseButtonsSupport()
+ {
+ if (!client->supportsEncoding(pseudoEncodingExtendedMouseButtons))
++ throw std::logic_error("Client does not support Extended Mouse Buttons");
+
+ needExtMouseButtonsEvent = true;
+ }
+
bool SMsgWriter::needFakeUpdate()
{
if (needSetDesktopName)
os->writeU16(0);
os->writeU32(pseudoEncodingQEMUKeyEvent);
}
- throw Exception("Client does not support extended mouse button events");
+
+ void SMsgWriter::writeExtendedMouseButtonsRect()
+ {
+ if (!client->supportsEncoding(pseudoEncodingExtendedMouseButtons))
- throw Exception("SMsgWriter::writeExtendedMouseButtonsRect: nRects out of sync");
++ throw std::logic_error("Client does not support extended mouse button events");
+ if (++nRectsInUpdate > nRectsInHeader && nRectsInHeader)
++ throw std::logic_error("SMsgWriter::writeExtendedMouseButtonsRect: nRects out of sync");
+
+ os->writeS16(0);
+ os->writeS16(0);
+ os->writeU16(0);
+ os->writeU16(0);
+ os->writeU32(pseudoEncodingExtendedMouseButtons);
+ }