nee
nee

Reputation: 3293

How to monitor active window changes using xcb?

I'm trying to find a way to monitor when the _NET_ACTIVE_WINDOW property changes. Right now I'm polling every 1 second to update the current active window. I know that there's a way to get events about this, I've seen references to it, but I can't seem to find any code (that I can understand) that explains how to do it.

Upvotes: 0

Views: 349

Answers (1)

Andrey Sidorov
Andrey Sidorov

Reputation: 25446

If you set PropertyChange mask on root window you'll start getting PropertyNotify events to your code. See example in my answer here: Linux get notification on focused gui window change

Upvotes: 1

Related Questions