How to get an X11 Window from a Process ID?

后端 未结 8 700
孤街浪徒
孤街浪徒 2020-11-27 11:30

Under Linux, my C++ application is using fork() and execv() to launch multiple instances of OpenOffice so as to view some powerpoint slide shows. This part works.

Ne

相关标签:
8条回答
  • 2020-11-27 12:33

    Check if /proc/PID/environ contains a variable called WINDOWID

    0 讨论(0)
  • 2020-11-27 12:33

    Bit late to the party. However: Back in 2004, Harald Welte posted a code snippet that wraps the XCreateWindow() call via LD_PRELOAD and stores the process id in _NET_WM_PID. This makes sure that each window created has a PID entry.

    http://www.mail-archive.com/devel@xfree86.org/msg05806.html

    0 讨论(0)
提交回复
热议问题