How to use gdk_window_add_filter



void gdk_window_add_filter (GdkWindow *window, GdkFilterFunc function,
gpointer data);

Following is the description of this function:

Adds an event filter to window, allowing you to intercept events before
they reach GDK. This is a low-level operation and makes it easy to break
GDK and/or GTK+, so you have to know what you're doing. Pass NULL for
window to get all events for all windows, instead of events for a
specific window.


If window is set NULL, then all events for all windows can be
intercepted? In my testing, it is not the case. Some mouse events are
not intercepted such as ButtonPress. Another strange case is that it
received a xevent which type is 113, this made me confusing?

Could someone tell me how to use this function? Is there a good example
for it?

Jeff





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]