X11 window 的完整图像是否可以使用 window id 和 window 被另一个覆盖

Can the full image of an X11 window be grab using the window id with the window is covered by another

我想使用它的 window ID 捕获 X11 window 的图像。 但是当 window(WinA) 被另一个 window(WinB) 覆盖时,它失败了,我捕获的图像是由部分 WinA 和 WinB 组合而成的,就像我在屏幕上看到的那样。 有什么方法可以忽略 window 的覆盖,这样无论 window 是否被覆盖,我都能得到完整的图像。 也许设置一些属性的WinA? 谢谢

引用精美手册:

If the window has backing-store, the backing-store contents are returned for regions of the window that are obscured by noninferior windows. If the window does not have backing-store, the returned contents of such obscured regions are undefined.

因此您需要设置 BackingStore window 属性。