Anyone familiar with #x11 could give me a hand with something?
I'm trying to send a key event to a previously focused window that is not itself.
For example, you focus on firefox, then open a terminal window and run this, the event is sent to firefox, and not itself.
https://paste.sr.ht/~rabbits/c6e817d573b0ffcc26cfa76d4fd602513a9386c9
@neauoire i don't in general see how the program could know what "the previously focused window" is. I don't think X keeps track of it. Do you have other means of knowing it? (if you do, it seems like you could modify xfake.c to send an event to any particular window; X definitely supports that).