如何使用 GTK 获取正在运行的应用程序的列表?
如何获取正在运行的应用程序的列表? 我指的是屏幕底部面板中的那些。
How can I get a list of the running applications? I'm referring to the ones in the panel at the bottom of the screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信你正在寻找的是 libwnck
I believe what you are looking for is libwnck
您所指的面板是 GNOME 面板。 所以这是一个 GNOME 问题,而不是 GTK 问题。
据我所知,GNOME 中没有明确定义的“多窗口应用程序”概念。 面板任务列表可能是通过查询窗口管理器的窗口列表并按窗口的“类”属性对窗口进行分组来构建的。
还必须考虑各种窗口管理器提示,例如忽略面板和其他实用程序窗口。 代替你,我会查看任务栏小程序的源代码。 也许某个地方有一些文档涵盖了现状,但我确实知道它会在哪里。
The panel you are referring to is the GNOME panel. So this is a GNOME question, not a GTK question.
There is not a well-defined concept of "multi-window application" in GNOME that I know of. The panel task list is probably build by querying the window manager for the list of windows and grouping the windows by their "class" property.
There are also various window manager hints that must be taken into account, for example to ignore panels and other utility windows. In your place, I would look at the source code of the taskbar applet. There is maybe some documentation somewhere that covers the status-quo, but I do know where it would be.