new X11 and old XNextEvent
I try to adapt some good old code to the environment of today. Further I've found that XNextEvent blocks the program I'm trying to debug. I read that this function worked in another way in the 90's and the early 00's than it does in the recent versions of X11. So my question is -- Is there any good way to replace the old XNextEvent? I tried with adding XPending like this:
...but that just put the CPU on 100%. I suppose it's because the code is in a loop.
Thanks in advance for help!