'GTK Get Widget Under Cursor

I am developing an application that inspects the GUI structure of GTK applications (similar to Firebug's Inspect mode).

Is there a way, in GTK, to retrieve the GtkWidget directly under the mouse cursor?

If not, is there a way to get the GtkWidget that handled a click event (without having to register my own signal handlers on every widget separately?)

gtk


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source