1

I wanted to know if the Overlay window was a child of the Root Window or not. That's because when I use XGetImage() for the root window, I see that the Overlay window also appears in the saved image (I save it through OpenCV 3.4.1). So, is there a method to get the image of only the root window (excluding the overlay window.)

I adopted the code for overlay window from here: X11 - Draw on Overlay Window

I read about Overlay from here: https://www.x.org/releases/X11R7.5/doc/compositeproto/compositeproto.txt

And read about XGetImage() from here: https://tronche.com/gui/x/xlib/graphics/XGetImage.html

I tried many ways, like changing the focus of input, using only XCompositeRedirectWindow (which resulted in BadMatch error), etc, but unable to get only root window image.

jww
  • 90,984
  • 81
  • 374
  • 818
Bms bharadwaj
  • 443
  • 4
  • 14

1 Answers1

0

Overlays can be tricky. You can use XQueryTree() to find parent and children windows from a given window.

FrodeTennebo
  • 502
  • 3
  • 12