summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2017-09-12 16:53:24 -0400
committerAdam Jackson <ajax@redhat.com>2017-09-13 11:10:56 -0400
commita49379b6045453c7b787cc638db6afd0d14dce9c (patch)
treea9aadfb328564602c807cbb901dcd455e2d25e13
parent9869dcb349b49f6d4cc2fab5d927cd8b1d1f463c (diff)
downloadxserver-a49379b6045453c7b787cc638db6afd0d14dce9c.tar.gz
fb: Check whether the window is enabled directly
... instead of its root window. Xwayland's rootless mode empties the root window border clip since its root window has no storage, but redirected windows (the only kind it can show) will have a non-empty border clip anyway, cf. the #ifdef COMPOSITE in miComputeClips. With this change, non-glamor Xwayland's GetImage actually works. Other acceleration layers may need to change to account for this, but this appears to be safe for the existing open source drivers. Only the xfree86 DDX has any problem with losing its framebuffer on VT switch, and even then only for UMS drivers (which excludes glamor, uxa, and sna from consideration). This leaves exa, which already contains code to evict pixmaps to host memory on VT switch. Since the xfree86 core will still empty the root clip on VT switch, while the root window itself may not contain a valid image we won't try to touch it, but GetImage from a redirected window will now work even when switched away. Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--fb/fb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fb/fb.h b/fb/fb.h
index 7d1e443dd..8ab050d0f 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -494,7 +494,7 @@ typedef struct {
*/
#define fbWindowEnabled(pWin) \
- RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip)
+ RegionNotEmpty(&(pWin)->borderClip)
#define fbDrawableEnabled(pDrawable) \
((pDrawable)->type == DRAWABLE_PIXMAP ? \