summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-07-20 09:32:42 +0000
committerAdam Tkac <atkac@redhat.com>2010-07-20 09:32:42 +0000
commit02fd9a6cda8d2f9686b691a16cc7ea4a0ef161b5 (patch)
tree3fe8abd0e1d556cb77f9a2f82d2f4b5d987ffcef /unix
parent62094c76fcf7937ce68a8775f69d2521aed21242 (diff)
downloadtigervnc-02fd9a6cda8d2f9686b691a16cc7ea4a0ef161b5.tar.gz
tigervnc-02fd9a6cda8d2f9686b691a16cc7ea4a0ef161b5.zip
[Development] Fetch root window pointer directly from pScreen if possible.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4090 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc10
-rw-r--r--unix/xserver/hw/vnc/xvnc.cc4
2 files changed, 12 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 59710775..ba7ccf77 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -765,8 +765,14 @@ void XserverDesktop::grabRegion(const rfb::Region& region)
region.get_rects(&rects);
for (i = rects.begin(); i != rects.end(); i++) {
for (int y = i->tl.y; y < i->br.y; y++) {
- (*pScreen->GetImage) ((DrawablePtr)WindowTable[pScreen->myNum],
- i->tl.x, y, i->width(), 1,
+ DrawablePtr pDrawable;
+#if XORG < 19
+ pDrawable = (DrawablePtr) WindowTable[pScreen->myNum];
+#else
+ pDrawable = (DrawablePtr) pScreen->root;
+#endif
+
+ (*pScreen->GetImage) (pDrawable, i->tl.x, y, i->width(), 1,
ZPixmap, (unsigned long)~0L,
((char*)data
+ y * bytesPerRow + i->tl.x * bytesPerPixel));
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
index af35f253..a6f27b34 100644
--- a/unix/xserver/hw/vnc/xvnc.cc
+++ b/unix/xserver/hw/vnc/xvnc.cc
@@ -878,7 +878,11 @@ static Bool vncRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
static void
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
+#if XORG < 19
WindowPtr pWin = WindowTable[pScreen->myNum];
+#else
+ WindowPtr pWin = pScreen->root;
+#endif
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = FALSE;