Hi ,<br><br>Thank you very much for your answer. <br><br><pre>&gt;&gt;&nbsp;And&nbsp;why&nbsp;sometimes&nbsp;the&nbsp;xevent-&gt;type&nbsp;is&nbsp;not&nbsp;right?&nbsp;(if&nbsp;the&nbsp;event_base&nbsp;=&nbsp;96&nbsp;,<br>&gt;&gt;&nbsp;then&nbsp;sometimes&nbsp;the&nbsp;xevent-&gt;type&nbsp;always&nbsp;be&nbsp;98&nbsp;but&nbsp;not&nbsp;97)<br>&gt;<br>&gt;"Sometimes"&nbsp;before&nbsp;"always"&nbsp;sounds&nbsp;pretty&nbsp;confusing&nbsp;to&nbsp;me.&nbsp;:)<br></pre>Those codes are from gnome-power-manager program, it will judge the xevent-&gt;type, and when it works normally, the xevent-&gt;type will be equal with event_base + XSyncAlarmNotify(it is defined as 1), but sometimes the program will become abnormal , then after print the value of xevent-&gt;type we found that it will be  "event_base + 2" but not "event_base + 1" at this situation.<br><br>I am sorry for my poor English to make you confuse.<br><br><pre>&gt;Thus,<br>&gt;whenever&nbsp;a&nbsp;triggering&nbsp;condition&nbsp;of&nbsp;a&nbsp;previously&nbsp;registered&nbsp;alarm&nbsp;occurs,&nbsp;the<br>&gt;interested&nbsp;client&nbsp;will&nbsp;be&nbsp;notified&nbsp;with&nbsp;a&nbsp;XSyncAlarmNotify&nbsp;event.<br></pre>Does that means that I could registered XSyncAlarm to the X server?&nbsp; How to do that, could you tell me? I want to let X server notify me when it has been idle for a given time.<br><br>And I will also try to find out from the document you mentioned.<br>Thanks again.<br>
<div>--<br>
<div>&nbsp;Best Regards,<br>
<br></div>
</div><br><pre><br>At&nbsp;2010-12-04&nbsp;23:55:56,"Fernando&nbsp;Carrijo"&nbsp;&lt;fcarrijo.lists@gmail.com&gt;&nbsp;wrote:

&gt;Hi&nbsp;Danny,
&gt;
&gt;danny&nbsp;&lt;tornadory@163.com&gt;&nbsp;wrote:
&gt;
&gt;&gt;&nbsp;Could&nbsp;you&nbsp;explain&nbsp;about&nbsp;the&nbsp;XSyncAlarmNotify?&nbsp;What's&nbsp;function&nbsp;it&nbsp;provides?
&gt;&gt;&nbsp;Which&nbsp;situation&nbsp;could&nbsp;it&nbsp;be&nbsp;sent&nbsp;by&nbsp;X&nbsp;server?
&gt;
&gt;It&nbsp;seems&nbsp;to&nbsp;me&nbsp;XSyncAlarmNotify&nbsp;is&nbsp;an&nbsp;event&nbsp;type,&nbsp;not&nbsp;a&nbsp;request&nbsp;type.&nbsp;And&nbsp;as
&gt;such,&nbsp;it&nbsp;is&nbsp;delivered&nbsp;from&nbsp;server&nbsp;to&nbsp;clients,&nbsp;not&nbsp;the&nbsp;other&nbsp;way&nbsp;around.&nbsp;Thus,
&gt;whenever&nbsp;a&nbsp;triggering&nbsp;condition&nbsp;of&nbsp;a&nbsp;previously&nbsp;registered&nbsp;alarm&nbsp;occurs,&nbsp;the
&gt;interested&nbsp;client&nbsp;will&nbsp;be&nbsp;notified&nbsp;with&nbsp;a&nbsp;XSyncAlarmNotify&nbsp;event.
&gt;
&gt;With&nbsp;respect&nbsp;to&nbsp;your&nbsp;first&nbsp;email:&nbsp;yes,&nbsp;a&nbsp;XSync&nbsp;enabled&nbsp;server&nbsp;keeps&nbsp;info&nbsp;about
&gt;its&nbsp;idle&nbsp;time&nbsp;but,&nbsp;from&nbsp;the&nbsp;top&nbsp;of&nbsp;my&nbsp;head,&nbsp;I&nbsp;don't&nbsp;remember&nbsp;which&nbsp;piece&nbsp;of&nbsp;the
&gt;protocol&nbsp;you&nbsp;can&nbsp;use&nbsp;to&nbsp;query&nbsp;it.
&gt;
&gt;Anyway,&nbsp;the&nbsp;fact&nbsp;is:&nbsp;the&nbsp;implementation&nbsp;of&nbsp;the&nbsp;XSync&nbsp;Extension,&nbsp;both&nbsp;client-
&gt;and&nbsp;server-side,&nbsp;is&nbsp;kind&nbsp;of&nbsp;easy&nbsp;to&nbsp;understand.&nbsp;Reading&nbsp;the&nbsp;code&nbsp;won't&nbsp;be&nbsp;hard,
&gt;after&nbsp;you&nbsp;grasp&nbsp;the&nbsp;main&nbsp;concepts&nbsp;introduced&nbsp;in&nbsp;the&nbsp;specifications.&nbsp;Give&nbsp;them
&gt;a&nbsp;try!
&gt;
&gt;&gt;&nbsp;And&nbsp;why&nbsp;sometimes&nbsp;the&nbsp;xevent-&gt;type&nbsp;is&nbsp;not&nbsp;right?&nbsp;(if&nbsp;the&nbsp;event_base&nbsp;=&nbsp;96&nbsp;,
&gt;&gt;&nbsp;then&nbsp;sometimes&nbsp;the&nbsp;xevent-&gt;type&nbsp;always&nbsp;be&nbsp;98&nbsp;but&nbsp;not&nbsp;97)
&gt;
&gt;"Sometimes"&nbsp;before&nbsp;"always"&nbsp;sounds&nbsp;pretty&nbsp;confusing&nbsp;to&nbsp;me.&nbsp;:)
&gt;
&gt;I'm&nbsp;not&nbsp;sure&nbsp;about&nbsp;it.
&gt;_______________________________________________
&gt;xorg-devel@lists.x.org:&nbsp;X.Org&nbsp;development
&gt;Archives:&nbsp;http://lists.x.org/archives/xorg-devel
&gt;Info:&nbsp;http://lists.x.org/mailman/listinfo/xorg-devel
</pre><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>