We had an unintentional conflict with PixelBuffer::setSize() here.
But we can simplify this further as this initialization is only used
by the subclass DeviceFrameBuffer, and only once.
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects.
Don't allow subclasses to just override dimensions or buffer details
directly and instead force them to go via methods. This allows us
to do sanity checks on the new values and catch bugs and attacks.
We now filter incoming data, which means we can start assuming the
clipboard data is always null terminated. This allows us to clean
up a lot of the internal handling.
This is required by the protocol so we should make sure it is
enforced. We are tolerant of clients that violate this though and
convert incoming clipboard data.
It doesn't belong on each socket server object as timers are global.
Force implementations to call the Timer system directly instead,
avoiding any middle men.
Do a proper cleanup when one of the termination timeouts trigger
rather than just exiting on the spot. This makes sure we don't leave
stray stuff around, e.g. unix socket files.
Removed the last parts of VNCSConnectionST's back door in to
VNCServerST and let the parent class fully handle coordination of
clients, and access to the desktop.
Force queryConnection() to always call back to approveConnection()
rather than return special values. This makes the flow easier to
follow as it will be the same in all cases.
It cannot keep itself in sync with the actual screen contents well
enough for CopyRect to work accurately. Graphical glitches could
be seen in some cases.
If scan codes are available using QEMU Extended Keyboard Messages
from clients, use that to inject scancodes directly into the
system using the SendInput API.
No conversion is needed as Windows uses the same scancode encoding.
Signed-off-by: Rahul Kale <Rahul.Kale@barco.com>
Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
This adds the basic infrastructure and handshake for the QEMU
Extended Key Events extension. No viewer or server makes use of
the extra functionality yet though.
rfb_win32: Add support for LED state notifications
LED support added using Windows GetKeyState() API call.
The state is polled for change in CapsLock/NumLock/ScrollLock
status in the same code block where chages to Cursor shape is polled.
Signed-off-by: Rahul Kale <Rahul.Kale@barco.com>
Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>