[Top][All Lists]

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

[Info-xnee] Help to adapt cnee for logging more events !!

From: sridhar
Subject: [Info-xnee] Help to adapt cnee for logging more events !!
Date: Thu, 24 Apr 2008 14:47:48 +0530


Hello  ,
i got struck in middle of my work,
i need the log format for the events in the following way ,
i hope you will help me in this,

i need the log format should be in the following way ,

windowid, time, event type(key/mouse/....etc) , event value(key typevalue/left or right or middle mouse button) , requestid, responseid  ...

so where should i need to change the cnee to meet my need,
exactly iam not aware of
GPLv3 license.

On Tue, Apr 15, 2008 at 11:13 AM, Henrik Sandklef <address@hidden> wrote:
sridhar skrev:
> *you are very helpful thanks alot , now iam clear about cnee...very very
> thanks
> *
> one more thing, so cnee does not store any window ids,

well, actually Xnee does. But only in one case. If a window is placed in
a different position when replaying than when recording Xnee uses the
window id to move the window to the correct position (which is the
position as when recorded). Xnee treats reparent-notifications in a
special way and stores window id to achieve the above.

> actually my requirement is to log  what are the events from a particular
> window to xserver, can you tell any tools to work out in this way , or cnee
> can do this..???

You can modify Xnee. Look at the file:


and the function:


and the switch/case:

   case ReparentNotify:
     new_window_pos = xnee_get_new_window_pos(xd);

     if (new_window_pos!=0)
         fprintf (out,"0,%u,0,0,0,0,0,%lu\n",
                  xrecintd->server_time );

     XTranslateCoordinates (xd->grab,

      * Prevent the same window pos to be printed more than once
     if ( (last_record_window_pos_win !=
           xrec_data->event.u.reparent.window) ||
          (last_record_window_pos_par !=
           xrec_data->event.u.reparent.parent) )

         if (!XFetchName(xd->grab, xrec_data->event.u.reparent.window,
           { /* Get window name if any */
             xnee_verbose((xd," window has has no name\n"));
         else if (win_name)
             xnee_verbose((xd," window has has name '%s'\n", win_name));
         fprintf (out,
         if (win_name)
             xnee_verbose((xd," freeing window name\n"));
         last_record_window_pos_win =
         last_record_window_pos_par =

you can probably use this code and modify it to get the win id for every
event. Will it consume a lot of CPU? You are aware the GPLv3 license
aren't you?

> On Mon, Apr 14, 2008 at 10:43 PM, Henrik Sandklef <address@hidden> wrote:
>> sridhar skrev:
>>> hi..friend,
>>> im sorry to ask repeatedly the silly things about cnee,
>>> iam a novice, just please help me,
>>> my requirement is to analyze the events to and from xserver,
>>> * as cnee is recording events, in the output till now iam not
>>> exactly knowing what each value represent,  does it stores about the
>> window
>>> id, on which a particular event has occurred, or is there any other tool
>> to
>>> analyze.
>>> ----------------------
>>> the following is the output fragment of  cnee
>>> using the following options
>>> cnee -o output1.xnr --record --device-event-range 2-6
>>> --delivered-event-range 7-31 --request-range 1-119 --verbose
>>> ##### my question what each value represents
>>> there are seven values in each line, what 1 stands for, 54 stands
>> for...and
>>> the others too..
>>> does it stores window ids too....
>> uh oh, it's clearly me who's not reading the manual. Sorry!!!!
>> Looking at the sources at:
>>   libxnee/src/print.c
>> at the function:
>>   xnee_record_print_request
>> you can see what's printed
>>> ****************
>>> 1,54,54,2,54540671,1304748143
>> so, let's do this together:
>> 1   is type, in this case: request
>> 54  what request, in this case: 54
>> 54  the length (think size)
>> 54540671   request id
>> 1304748143  server time
>>> 1,59,59,5,54540651,1304748143
>>> 1,53,53,4,54540674,1304748143
>>> 1,55,55,5,54540675,1304748143
>>> 1,72,72,19,54540674,1304748143
>> and so forth
>> Thanks for requesting an answer, instead of my rtfm. You found a bug.
>> It's now fixed in CVS (HEAD).
>>> ******************
>>> ------------------------------------------------------------------------
>>> _______________________________________________
>>> Info-xnee mailing list
>>> address@hidden


Univ of Hyderabad
Life is pleasant. Death is peaceful. It's the transition that's troublesome.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]