fix missing color map when setting new frame buffer
The code to set a new framebuffer when the desktop resizes correctly set the remoteFormat, but did not transfer the color map. This leads to a null-pointer dereference later, as the code treats the format as having a color map in the framebuffer. (This should probably also be fixed with an assertion, but I didn't do that here).
To keep API changes minimal and the solution robust, this changes vnc_connection_set_framebuffer
so that it copies over the color map from the old framebuffer if it existed, had the same remote format and had no color map yet.
I needed to add one new API: vnc_framebuffer_get_color_map
.
Note: I have barely ever written anything in C, let alone Glib/GObject before.
Fixes #28.
Edited by Marco Köpcke