[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: X Event Capturing



Hello!
Thanks for your reply. I had sent only a portion of the code for capturing events. (I had already specified the event mask).

XSelectInput(dpy, w, attr.event_mask);

However, I have found that the events get captured if I "break" (instead of "continue") the while loop in case queue length is 0. Otherwise, it keeps waiting unnecessarily for an event to occur.
I still use XNextEvent, since I am interested in the events of all windows.

Now, I want to get the following clarified. According to the Xlib manual, XNextEvent removes the event from the queue. If my monitoring program removes every event like this, will each event ever reach the destined application? But there seems to be no such "missed" event when I execute my program. Does this mean that my monitoring program also receives every event that other apps. receive? (If I use XPeekEvent, each event gets recorded several times by my program).

Waiting for the discussion to be enlivened,
- Karthika









_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com