Is there a function like `xwininfo -tree`?

I wanted to write a application like spy++ under Linux, but I found that root window was invalid when I used gdk_get_default_root_window and then called gdk_window_get_children.
And other functions, such as
also not work on another application
I want to know if there is a method to directly obtain the internal structure of any GTK program without using hook.

You can’t. That API is meant to be used for the windows created by your application. There is no API that lets you access other windows and their contents, save for the accessibility API, which is not meant to be used like that anyway.

Anything that can do that is a privileged component, and should be part of the system, not a random application.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.