aboutsummaryrefslogtreecommitdiffstats
path: root/unix/x0vncserver/Geometry.h
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2008-09-02 10:33:23 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2008-09-02 10:33:23 +0000
commit6b5b878913fd50e85aac2b64585e9c9206b63117 (patch)
tree5616260054835509e495ec4272fba3ecb6a6fbea /unix/x0vncserver/Geometry.h
parent2ef6695fe7dbc850d1981cbab04b7595f39328bc (diff)
downloadtigervnc-6b5b878913fd50e85aac2b64585e9c9206b63117.tar.gz
tigervnc-6b5b878913fd50e85aac2b64585e9c9206b63117.zip
[Bugfix] Geometry::getVideoRect() should return coordinates relative to the
framebuffer shown to RFB clients. Previously, it returned absolute screen coordinates so that the origin of video area could be displaced. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2745 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/x0vncserver/Geometry.h')
-rw-r--r--unix/x0vncserver/Geometry.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/unix/x0vncserver/Geometry.h b/unix/x0vncserver/Geometry.h
index 82da9c6e..69ab687d 100644
--- a/unix/x0vncserver/Geometry.h
+++ b/unix/x0vncserver/Geometry.h
@@ -33,13 +33,23 @@ class Geometry
public:
Geometry(int fullWidth, int fullHeight);
+ // Return coordinates and dimensions that specify a rectangular part
+ // of the desktop that would be shown to RFB clients. This
+ // information is extracted in the constructor from the "Geometry"
+ // parameter.
int width() const { return m_rect.width(); }
int height() const { return m_rect.height(); }
int offsetLeft() const { return m_rect.tl.x; }
int offsetTop() const { return m_rect.tl.y; }
+
+ // Return the same information as a Rect structure.
const Rect& getRect() const { return m_rect; }
- bool isVideoAreaSet() const { return !m_videoRect.is_empty(); }
+ // Return coordinates of the video rectangle if one was set with the
+ // "VideoArea" parameter. The coordinates are relative to the whole
+ // rectangle as returned by getRect(). In other words, the
+ // coordinate (0, 0) corresponds to the top left corner of the
+ // rectangle shown to RFB clients.
const Rect& getVideoRect() const { return m_videoRect; }
protected: