What's the meaning of XSyncAlarmNotify ?

danny tornadory at 163.com
Fri Dec 3 19:13:07 PST 2010


Could any one help me on this?

Could you explain about the XSyncAlarmNotify? What's function it provides? Which situation could it be sent by X server?
And why sometimes the xevent->type is not right? (if the event_base = 96 , then sometimes the xevent->type always be 98 but not 97)

An XSyncAlarmNotifyEvent’s type field has the value event_base +
XSyncAlarmNotify. The fields of this structure are:

int             type;         /* event_base + XSyncAlarmNotify */
unsigned long   serial;       /* number of last request processed by server */
Bool            send_event;   /* true if this came from a SendEvent request */
Display *       display;      /*Display the event was read from */
XSyncAlarm      alarm;        /* alarm that triggered */
XSyncValue      counter_value /* value that triggered the alarm */
XSyncValue      alarm_value   /* test value of trigger in alarm */
Time            time;         /* milliseconds */
XSyncAlarmState state;        /* new state of alarm */



--

 Best Regards,



At 2010-12-03 11:06:16,danny <tornadory at 163.com> wrote:
Hi all,

When I try to find out how to judge the idle time of the system, I find XSyncAlarmNotify in the gnome-power-manager, and such codes are:
        ...
        XEvent *xevent = (XEvent *) gdkxevent;
        EggIdletime *idletime = (EggIdletime *) data;
        XSyncAlarmNotifyEvent *alarm_event;

        if (xevent->type != idletime->priv->sync_event + XSyncAlarmNotify){
                return GDK_FILTER_CONTINUE;
        }
        ...try to enter sleep mode

But now sometimes it will failed, so I want to know that what's meaning of XSyncAlarmNotify, and could any one tell me how to judge the idle of the system(should be the X system)?

Thanks in advance.


--

 Best Regards,





网易163/126邮箱百分百兼容iphone ipad邮件收发
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101204/86da3dcc/attachment.htm>


More information about the xorg-devel mailing list