To subscribe to events for other applications on the same display, I use:
XSelectInput(display, my_root, SubstructureNotifyMask);
This works, but I get a ton of CreateNotify/MapNotify/UnmapNotify etc events. What I want to know is how to filter the events. From all of these events, I need to basically determine:
- Is the window in the event a top-level window? - If so, what should the name of the button be?
The problem is the window manager gets in the way. From what I can tell, it looks like the sequence is:
1) Window is created (CreateNotify). When the CreateNotify event is received, the parent of the window always seems to be the root window.
2) The window manager creates a window with the titlebar and whatnot. This window doesn't have a wm name and I don't know how to tell from the windowid that it's a toplevel window manager window? All I see is a bunch of CreateNotify events with no window name.
3) The window manager window reparents the main window (ReparentNotify).
4) The window manager window is mapped (MapNotify).
I guess what I'd like to do is wait for the MapNotify event, and then determine if the windowid corresponds to a top-level "real" window created by the window manager. If it does, then I want to find the window manager name of the "main" child of that window, the window that had been reparented by that window. At that point I can let Qt handle the rest. Or maybe there's some ridiculously easy other way of doing this and I've wasted the last several days trying to figure this out? Any ideas?
Thanks, Aaron
_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel