https://kotlinlang.org logo
e

elect

05/11/2019, 2:58 PM
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
        }
    }