Hi everyone,

I have an Entry widget inside an EventBox (innerEventBox), and I have the innerEventBox inside another
EventBox (outerEventBox).

I need to traverse from the Entry widget to the outerEventBox so I can set the background color of the
outerEventBox.

I have the following code to do this:

         get2ndAncestor :: Widget -> GType -> IO (Maybe Widget)
         get2ndAncestor widget gtype =
            do ancestor1 <- widgetGetAncestor widget gtype
               ancestor2 <- maybe (return Nothing) ((flip widgetGetAncestor) gtype) ancestor1
               return ancestor2

When I use this code, it gets the 1st ancestor correctly, but the 2nd ancestor is the same as the 1st.
The code above never returns the 2nd ancestor.

The docs for widgetGetAncestor has a line that says:

"Note that unlike widgetIsAncestor, widgetGetAncestor considers widget to be an ancestor of itself."

I am not sure exactly what that line means, and if it is the cause of my problems.  If so, how do I get the
ancestor of the ancestor of a widget?

Regards

Rouan