@drj Oooh! Yes, okay, let say I wanted to make it so some_little_program waits for a click on a window(`click on any window`), do you know how I can do this?
Top-level
@drj Oooh! Yes, okay, let say I wanted to make it so some_little_program waits for a click on a window(`click on any window`), do you know how I can do this? 4 comments
@drj aaah! amazing, thank you so much, that should be enough for me to get it working :) |
@neauoire I only ever wrote 1 X11 program, but it was using XLib and none of the new-fangled framework nonsense (it was on a DEC Ultrix machine in about 1994). I _think_ you "simply" call XNextEvent; see how xev.c does it https://gitlab.freedesktop.org/xorg/app/xev/-/blob/master/xev.c#L1479
I _think_ by default an X11 client gets all events (for all windows!) unless it has requested only events for particular windows (like their own, which most apps would do); i think that's XSelectInput.