get_attach_widget() returns the object to which the calling GtkMenu is currently attached. Use get_name() to further identify the returned object, or else compare it with likely candidates.