Re: [XFree86] Find Fake Event

2003-08-28 Thread Henrik Sandklef
Hi!

You can fake events in (at least) two ways in X. One way is by using
XSendEvent and another is by using the XTest extension.

When using XSendEvent you can check in your application if the was sent
with this function. Some sample code:

  XEvent ev;

  XNextEvent(&ev);
  if (ev.xkey.send_event==1)
printf ("hey, stop sending them faked events\n");
  else
printf ("hey, this doesn't seem to be faked\n");




When, on the other hand, using XTestFakeMotionEvent (to fake a motion
event) I don't know of any way to check if it was faked using XTest
extension.



regards, hesa

On Thu, 2003-08-28 at 08:04, Bharathi S wrote:
> Hello All,
> 
> How to differentiate the Fake Event from Normal Event ?
> 
> TIA,

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


[XFree86] Find Fake Event

2003-08-28 Thread Bharathi S
Hello All,

How to differentiate the Fake Event from Normal Event ?

TIA,
-- 
Bharathi S, IndLinuX Team,   (__)
DON Lab,TeNeT Group, oo )
IIT-Madras, Chennai-INDIA.   (_/\ 

Known is DROP, Unknown is OCEAN.

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86