Getting pid and details for topmost window

前端 未结 9 1078
醉酒成梦
醉酒成梦 2020-12-04 13:08

Does anyone know how to get the PID of the top active window and then how to get the properties of the window using the PID? I mean properties like process name, program nam

9条回答
  •  没有蜡笔的小新
    2020-12-04 13:28

    One of things about X is that it's network transparent. It's quite possible that the actual window being displayed at the top (which has focus) is running on a machine other than your own in which case, the process id of the process running inside the window will make no sense on your machine.

    Can you elaborate a little on what you want to do? I think there are some missing details here. Ideally, you should work at the X level rather than at the machine specific one.

提交回复
热议问题