I'm writing an Xlib tool in C on Debian Linux to detect certain Firefox dialog boxes and automatically click their "OK" buttons. For the moment, I just have a program that finds every X11 window and reports on them.
I've been able to use the WM_CLASS and WM_NAME properties to identify the top-level window I need, but I see no way of getting at identifying information (hopefully, the button text) to determine which of its child windows is the widget I want to send an event to.
Is there a way to use the higher-level libraries to get at some of this widget information, using a known X11 Window ID?