> 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
or to 2) 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 ..

The problem is - how can I detect where the event originally belonged to?

> i believe this special "hook part " is best done in pure Xlib ... maybe
> aftwards you can generate GTK - events again , but hooking all events
> should not a GTK thing

I implemented a small test app in pure X. I think I can work my way upwards
once I have a solution on that level. But it may not even neccessary. I could
also live without that and find another way to feed my app with the event
that I capture, so I don't think that this will be the problem (I could be
wrong on that, though :) ). As long as I don't have even one solution on any
level I don't know how to proceed. That's why I though this list would be a good
place to ask, because I thought that here should be many people familiar with
X. :)

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

Reply via email to