Python: Xlib — How can I raise(bring to top) windows?

前端 未结 3 1649
星月不相逢
星月不相逢 2021-01-13 03:42

I\'ve tried using:

   win.configure(stack_mode=X.TopIf)
   win.set_input_focus(X.RevertToParent, X.CurrentTime)

However even without any fo

3条回答
  •  不思量自难忘°
    2021-01-13 03:54

    Try this:

    window=Display().screen().root.query_pointer().child
    window.set_input_focus(X.RevertToParent, X.CurrentTime)
    window.configure(stack_mode=X.Above)
    

提交回复
热议问题