Does xlib have an active window event?

前端 未结 3 666
醉酒成梦
醉酒成梦 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条回答
  •  梦谈多话
    2021-01-03 11:52

    Can't you just select PropertyChange on the root window to get sent PropertyNotify events when any property is updated and then check each event to see if it was for _NET_ACTIVE_WINDOW?

提交回复
热议问题