From 7c721ccdea88c10ef4c6500cb06cca0031fccdd8 Mon Sep 17 00:00:00 2001 From: george82 Date: Sat, 23 Sep 2006 07:09:37 +0000 Subject: [PATCH] Initial support all color formats by the vncviewer in the scaling mode. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2103 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- win/vncviewer/DesktopWindow.cxx | 8 ++++---- win/vncviewer/DesktopWindow.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx index 313b756d..ee941fd1 100644 --- a/win/vncviewer/DesktopWindow.cxx +++ b/win/vncviewer/DesktopWindow.cxx @@ -856,7 +856,7 @@ DesktopWindow::hideLocalCursor() { void DesktopWindow::showLocalCursor() { if (cursorAvailable && !cursorVisible && cursorInBuffer) { - if (!buffer->getPF().equal(cursor.getPF()) || + if (!buffer->getScaledPixelFormat().equal(cursor.getPF()) || cursor.getRect().is_empty()) { vlog.info("attempting to render invalid local cursor"); cursorAvailable = false; @@ -931,7 +931,7 @@ DesktopWindow::notifyClipboardChanged(const char* text, int len) { void DesktopWindow::setPF(const PixelFormat& pf) { // If the cursor is the wrong format then clear it - if (!pf.equal(buffer->getPF())) + if (!pf.equal(buffer->getScaledPixelFormat())) setCursor(0, 0, Point(), 0, 0); // Update the desktop buffer @@ -1022,13 +1022,13 @@ DesktopWindow::setCursor(int w, int h, const Point& hotspot, void* data, void* m cursor.hotspot = hotspot; cursor.setSize(w, h); - cursor.setPF(buffer->getPF()); + cursor.setPF(buffer->getScaledPixelFormat()); cursor.imageRect(cursor.getRect(), data); memcpy(cursor.mask.buf, mask, cursor.maskLen()); cursor.crop(); cursorBacking.setSize(w, h); - cursorBacking.setPF(buffer->getPF()); + cursorBacking.setPF(buffer->getScaledPixelFormat()); cursorAvailable = true; diff --git a/win/vncviewer/DesktopWindow.h b/win/vncviewer/DesktopWindow.h index 6e7a1d0b..11b66703 100644 --- a/win/vncviewer/DesktopWindow.h +++ b/win/vncviewer/DesktopWindow.h @@ -83,7 +83,7 @@ namespace rfb { // - Set the pixel format, size etc of the underlying PixelBuffer void setPF(const PixelFormat& pf); - PixelFormat getPF() const { return buffer->getPF(); } + PixelFormat getPF() const { return buffer->getPixelFormat(); } void setSize(int w, int h); void setColour(int i, int r, int g, int b) {buffer->setColour(i, r, g, b);} void setAutoScaling(bool as); -- 2.39.5