]> source.dussan.org Git - tigervnc.git/commitdiff
[Development] Fetch root window pointer directly from pScreen if possible.
authorAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 09:32:42 +0000 (09:32 +0000)
committerAdam Tkac <atkac@redhat.com>
Tue, 20 Jul 2010 09:32:42 +0000 (09:32 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4090 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/xserver/hw/vnc/XserverDesktop.cc
unix/xserver/hw/vnc/xvnc.cc

index 597107756f00c1bf036e3d75f450f4c28591a18d..ba7ccf779c5c71d06e5adbaea728b1cf71e18b31 100644 (file)
@@ -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));
index af35f2532499a9fe846620b362d5e3253b6dcbaf..a6f27b34a0d7333842d876237e66f64e189bd3dd 100644 (file)
@@ -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;