From: george82 Date: Wed, 24 May 2006 04:23:46 +0000 (+0000) Subject: Small code improvements. Convert the coordinates from X-Git-Tag: v0.0.90~384^2~292 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c4f23ec5eac4fd2da78754d43e8b0dd7bd2e6f4;p=tigervnc.git Small code improvements. Convert the coordinates from scaled to source only if ScaledDibSectionBuffer in the scaled mode. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@580 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index c7b496bb..27ef2dc2 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -775,8 +775,10 @@ DesktopWindow::processFrameMessage(UINT msg, WPARAM wParam, LPARAM lParam) { // Send a pointer event to the server oldpos = p; - p.x /= double(buffer->getScale()) / 100; - p.y /= double(buffer->getScale()) / 100; + if (buffer->isScaling()) { + p.x /= double(buffer->getScale()) / 100.0; + p.y /= double(buffer->getScale()) / 100.0; + } ptr.pointerEvent(callback, p, mask); #ifdef WM_MOUSEWHEEL }