Re: [XFree86] Find Fake Event

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

 



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
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux