Here's the sequence that triggers the bug:
. create a top level TOP
. create a child window CHILD (parented to TOP).
. create a window TRANSIENT.
. Add TRANSIENT as a transient child of CHILD.
. Add TRANSIENT to the window hierarchy some where.
At this point the wm knows about TRANSIENT, but it was never told TRANSIENT is a transient of CHILD. This is because the wm sees TRANSIENT by way of OnWindowHierarchyChanged, which doesn't contain transients.
The fix is likely two fold:
. If the wm knows about the parent, it should be told about TRANSIENT at the time TRANSIENT is added as a transient child.
. When the wm learns about new windows via OnWindowHierarchyChanged() it should be told about transient relationships.
WidgetTest.BubbleControlsResetOnInit triggers this bug.
Comment 1 by sky@chromium.org
, Nov 10 2016