Does xlib have an active window event?

前端 未结 3 665
醉酒成梦
醉酒成梦 2021-01-03 11:11

I am trying to write a program that tracks when the active window changes using Xlib. I am have trouble figuring out the best way to do this. These are my ideas so far:

3条回答
  •  猫巷女王i
    2021-01-03 12:02

    I've been looking for "active windows change event grabber" as well. What I use in mean time (and might be helpful for you) is combination of xdotool and xwininfo.

    xwininfo -id "$(xdotool getactivewindow)"
    

提交回复
热议问题