Could any one help me on this?<br><br>Could you explain about the XSyncAlarmNotify? What's function it provides? Which situation could it be sent by X server?<br>And why sometimes the xevent->type is not right? (<font color="#0000ff">if the event_base = 96 , then sometimes the xevent->type always be 98 but not 97</font>)<br><br>An XSyncAlarmNotifyEvent’s type field has the value event_base +<br>XSyncAlarmNotify. The fields of this structure are:<br><br><font color="#ff0000">int type; /* event_base + XSyncAlarmNotify */</font><br>unsigned long serial; /* number of last request processed by server */<br>Bool send_event; /* true if this came from a SendEvent request */<br>Display * display; /*Display the event was read from */<br><font color="#ff0000">XSyncAlarm alarm; /* alarm that triggered */</font><br>XSyncValue counter_value /* value that triggered the alarm */<br>XSyncValue alarm_value /* test value of trigger in alarm */<br>Time time; /* milliseconds */<br>XSyncAlarmState state; /* new state of alarm */<br><br><br><div>--<br>
<div> Best Regards,<br>
<br></div>
</div><br>At 2010-12-03 11:06:16,danny <tornadory@163.com> wrote:<br> <blockquote id="isReplyContent" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);">Hi all,<br><br>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:<br> ...<br> XEvent *xevent = (XEvent *) gdkxevent;<br> EggIdletime *idletime = (EggIdletime *) data;<br> XSyncAlarmNotifyEvent *alarm_event;<br><br> if (xevent->type != idletime->priv->sync_event + XSyncAlarmNotify){<br> return GDK_FILTER_CONTINUE;<br> }<br> ...try to enter sleep mode<br><br>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)?<br><br>Thanks in advance.<br><br><div>--<br>
<div> Best Regards,<br>
<br></div>
</div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><hr>
<a href="http://help.163.com/special/007525G0/163mail_guide.html?id=2716" target="_blank">网易163/126邮箱百分百兼容iphone ipad邮件收发</a>
</span></span></blockquote><br><br><span title="neteasefooter"><span id="netease_mail_footer"><hr/>
<a href="http://help.163.com/special/007525G0/163mail_guide.html?id=2716" target="_blank">网易163/126邮箱百分百兼容iphone ipad邮件收发</a>
</span></span>