Render on a temporary surface when needed
Some platforms draw directly to the screen, which means that updates
will flicker if we draw multiple layers. Prevent this by first
composing the update on a hidden surface.
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index ac1ec33..0967fcb 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -29,6 +29,7 @@
class CConn;
class PlatformPixelBuffer;
+class Surface;
class Viewport : public Fl_Widget {
public:
@@ -46,6 +47,8 @@
void setCursor(int width, int height, const rfb::Point& hotspot,
void* data, void* mask);
+ void draw(Surface* dst);
+
// Fl_Widget callback methods
void draw();