``` tailrec fun Window.getParent(): Window { return when { flags has Wf.Chil...
e
Copy code
tailrec fun Window.getParent(): Window {
        return when {
            flags has Wf.ChildWindow && flags hasnt (Wf.Popup or Wf.ChildMenu) -> parentWindow?.getParent() ?: this
            else -> this
        }
    }