[PATCH 2/2] fb: Remove screen extents checks for GetImage/GetSpans.

Emmanuel Gil Peyrot emmanuel.peyrot at collabora.com
Mon Sep 11 18:07:29 UTC 2017


Screenshotting is currently broken when using Xwayland’s non-GLAMOR
code path rootless.  The previous commit adds a similar check in exa to
prevent any regression on backends which have to prevent snapshotting
when the user switched VTs.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
---
 fb/fb.h      | 12 ------------
 fb/fbgetsp.c |  7 -------
 fb/fbimage.c |  7 -------
 3 files changed, 26 deletions(-)

diff --git a/fb/fb.h b/fb/fb.h
index 7d1e443dd..194c5efed 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -488,18 +488,6 @@ typedef struct {
     fbGetPixmapStipData(_pPix, pointer, stride, bpp);				\
 }
 
-/*
- * XFree86 empties the root BorderClip when the VT is inactive,
- * here's a macro which uses that to disable GetImage and GetSpans
- */
-
-#define fbWindowEnabled(pWin) \
-    RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
-
-#define fbDrawableEnabled(pDrawable) \
-    ((pDrawable)->type == DRAWABLE_PIXMAP ? \
-     TRUE : fbWindowEnabled((WindowPtr) pDrawable))
-
 #define FbPowerOfTwo(w)	    (((w) & ((w) - 1)) == 0)
 /*
  * Accelerated tiles are power of 2 width <= FB_UNIT
diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c
index 445a4e385..149b82ab0 100644
--- a/fb/fbgetsp.c
+++ b/fb/fbgetsp.c
@@ -37,13 +37,6 @@ fbGetSpans(DrawablePtr pDrawable,
     int srcXoff, srcYoff;
     int xoff;
 
-    /*
-     * XFree86 DDX empties the root borderClip when the VT is
-     * switched away; this checks for that case
-     */
-    if (!fbDrawableEnabled(pDrawable))
-        return;
-
     fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
 
     while (nspans--) {
diff --git a/fb/fbimage.c b/fb/fbimage.c
index bd24728fd..d49d6dc44 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -215,13 +215,6 @@ fbGetImage(DrawablePtr pDrawable,
     FbStip *dst;
     FbStride dstStride;
 
-    /*
-     * XFree86 DDX empties the root borderClip when the VT is
-     * switched away; this checks for that case
-     */
-    if (!fbDrawableEnabled(pDrawable))
-        return;
-
     fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
 
     x += pDrawable->x;
-- 
2.14.1



More information about the xorg-devel mailing list