[gtk-vnc] Always send back pixel format message



commit d8adb75e926872792b57a7ece5ce7d8cf2c2d8bc
Author: Daniel P. Berrange <berrange redhat com>
Date:   Fri Apr 25 17:30:12 2014 +0100

    Always send back pixel format message
    
    If operating in 8bpp colourmap mode, at least one, VNC server is
    known to not send the colourmap entries until after it receives
    the set pixel format message. So always send that message even
    if it is just matching the server's default.
    
    Signed-off-by: Daniel P. Berrange <berrange redhat com>

 src/vncdisplay.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index 9744c19..e90f568 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -1207,15 +1207,12 @@ static gboolean vnc_display_set_preferred_pixel_format(VncDisplay *display)
         VNC_DEBUG ("Using default colour depth %d (%d bpp) (true color? %d)",
                    currentFormat->depth, currentFormat->bits_per_pixel,
                    currentFormat->true_color_flag);
-#if 0
         /* TigerVNC always sends back the encoding even if
-           unchanged from what the server suggested. This
-           does not appear to matter, so lets save the bytes */
+           unchanged from what the server suggested. This is
+           important with some VNC servers, since they won't
+           otherwise send us the colour map entries */
         memcpy(&fmt, currentFormat, sizeof(fmt));
         break;
-#else
-        return TRUE;
-#endif
 
     case VNC_DISPLAY_DEPTH_COLOR_FULL:
         fmt.depth = 24;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]