window = Display().screen().root.query_pointer().child
window.set_input_focus(X.RevertToParent, X.CurrentTime)
window.configure(stack_mode=X.Above)
Python: Xlib -- How can I raise(bring to top) windows?