[PATCH] fb: Remove screen extents check, fix GetImage/GetSpans on Xwayland.

Daniel Stone daniel at fooishbar.org
Tue May 16 10:52:14 UTC 2017


Hi Emmanuel,

On 4 April 2017 at 10:45, Emmanuel Gil Peyrot
<emmanuel.peyrot at collabora.com> wrote:
> Screenshotting is currently broken when using Xwayland’s non-GLAMOR
> code path headless, due to the screen extents being unknown and thus
> initialised to zero.
>
> This patch doesn’t seem to introduce any regression on GetImage when
> using e.g. the modesetting DDX and switching away to another VT,
> contrary to what the comment was saying, but I would welcome a more
> experienced pair of eyes for that.
> ---
>  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)

Does this work if, rather than deleting the entire check, you just
change borderClip to borderSize?

Cheers,
Daniel


More information about the xorg-devel mailing list