summaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r--vncviewer/Viewport.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 3d0d6888..ca65acde 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -281,6 +281,8 @@ void Viewport::resize(int x, int y, int w, int h)
const rdr::U8* data;
int stride;
+ const rdr::U8 black[4] = { 0, 0, 0, 0 };
+
// FIXME: Resize should probably be a feature of the pixel buffer itself
if ((w == frameBuffer->width()) && (h == frameBuffer->height()))
@@ -304,14 +306,14 @@ void Viewport::resize(int x, int y, int w, int h)
rect.setXYWH(frameBuffer->width(), 0,
newBuffer->width() - frameBuffer->width(),
newBuffer->height());
- newBuffer->fillRect(rect, 0);
+ newBuffer->fillRect(rect, black);
}
if (newBuffer->height() > frameBuffer->height()) {
rect.setXYWH(0, frameBuffer->height(),
newBuffer->width(),
newBuffer->height() - frameBuffer->height());
- newBuffer->fillRect(rect, 0);
+ newBuffer->fillRect(rect, black);
}
delete frameBuffer;