Python:Xlib

编程入门 行业动态 更新时间:2024-10-25 16:21:37
本文介绍了Python:Xlib-如何举起Windows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试使用:

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

但是,即使在我的窗口管理器上没有任何防止焦点丢失的方法,这也不起作用,有人知道有另一种方法可以做到这一点吗?是否使用Xlib.

However even without any focus loss prevention on my window manager this does not work, does anyone know of another way to do this? Xlib or not.

推荐答案

有一个名为 wmctrl ,使您可以与EWMH/NetWM兼容的X窗口管理器进行交互.

There is a command-line tool called wmctrl which allows you to interact with EWMH/NetWM-compatible X window managers.

例如,

wmctrl -l

列出由窗口管理器管理的所有窗口,并且

lists all the windows managed by the window manager, and

wmctrl -a Mozilla

使列表中的第一个窗口处于活动状态,该窗口的标题为字符串"Mozilla". 还有其他选择窗口的方法.以上只是一个例子.

makes active the first window in the list which has the string "Mozilla" in its title. There are other ways to select windows; the above is just an example.

wmctrl也使您能够移动和调整窗口大小.

wmctrl enables you to move and resize windows too.

更多推荐

Python:Xlib

本文发布于:2023-07-31 07:27:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1256721.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Python   Xlib

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!