Make sure the fill function pointer gets updated if the
managed pixel buffer changes format. Also add a bit more
protection for switching pixel format as the base classes
aren't really designed for that. Fixes a crash with the
mouse pointer in WinVNC.
Based on work done by Daniel Wyatt (dewyatt).


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5152 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/PixelBuffer.h b/common/rfb/PixelBuffer.h
index d721fa2..e870622 100644
--- a/common/rfb/PixelBuffer.h
+++ b/common/rfb/PixelBuffer.h
@@ -44,7 +44,10 @@
     //
 
     // Set/get pixel format & colourmap
+  protected:
+    // Only for subclasses that support changing parameters
     virtual void setPF(const PixelFormat &pf);
+  public:
     virtual const PixelFormat &getPF() const;
     virtual ColourMap* getColourMap() const;
 
@@ -103,6 +106,10 @@
                          rdr::U8* data_, ColourMap* cm);
     virtual ~FullFramePixelBuffer();
 
+  protected:
+    virtual void setPF(const PixelFormat &pf);
+
+  public:
     // - Get the number of pixels per row in the actual pixel buffer data area
     //   This may in some cases NOT be the same as width().
     virtual int getStride() const;