diff --git a/redo/window_unix.go b/redo/window_unix.go index 3992443..f110e5f 100644 --- a/redo/window_unix.go +++ b/redo/window_unix.go @@ -68,6 +68,9 @@ func (w *window) SetControl(control Control) *Request { c := make(chan interface{}) return &Request{ op: func() { + if w.child != nil { // unparent existing control + w.child.unparent() + } control.unparent() control.parent(w) w.child = control