Gerhard Gruber schrieb:

I dont think you will need to "poll " ...



I definittly don't want to poll. That's the ugliest solution that I can think of. :) Also polling doesn't solve the problem of capturing the event as I want it. If I want to take the event for myself then the app shouildn't get it. The app should only get it when I decided that I don't need it. If I have to go this way, then I would rather start a seperate thread with it's own XEvent loop, which is much better for performance and doesn't waste time on polling.



you say you already manage to grab them , so then you only need to
decide to sent them back or not.



Yes.




I the XLib function XSendEvent is capable to re-generate the
uninteressting event`s and sent them



I already tried XSendEvent, but it didn't work out as I expected it. But
this may be more a problem of me then of the function. :) When I recive the
event it will be filled with all the event data. There are some field in it that
tells me the window where the event belong, but this will be alwayxs the root
window in my case, right? So when I send the event back with XSendEvent then
I will receive it promptly because I capture all events. The proper solution
would require 1) that I either determine where the event really belongs to


it should work with XSendEvent shoudlnt it ??
the man tells me

XSendEvent(*display*, *w*, *propagate*, *event_mask*, *event_send*)
     Display <http://tronche.com/gui/x/xlib/display/opening.html#Display> **display*;
     Window *w*;
     Bool *propagate*;
     long *event_mask*;
     XEvent <http://tronche.com/gui/x/xlib/events/structures.html#XEvent> 
**event_send*;


where *w* Specifies the window the event is to be sent to, or *PointerWindow*, or *InputFocus


*

send it back telling X that I'm not interested in it and it should
pass it on to where it belongs after me.

Of course 2 would be prefereable. In case of 1 I wonder how to do it. I
don't want to re-implement X in that I should decide which window is visible at
where the mousepointer is and send it on to that window (I will investigate
this though). I also tried to use XPushBackEvent and then disconnected from the
server, then made a small delay and reconnected again.  This also didn't
work out, because the event was lost, though I would have expected that it
should have been put back in the X queue.



back to where it should belong ... just make sure that you also
investigate all the other things of the event so that you can aftwards
generate a proper new one ..



















_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel

Reply via email to