<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:prahal@yahoo.com" title="Alban Browaeys <prahal@yahoo.com>"> <span class="fn">Alban Browaeys</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - infinite loop when lid events are repeated - list item points to itself"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103298">bug 103298</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>prahal@yahoo.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - infinite loop when lid events are repeated - list item points to itself"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103298#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - infinite loop when lid events are repeated - list item points to itself"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103298">bug 103298</a>
              from <span class="vcard"><a class="email" href="mailto:prahal@yahoo.com" title="Alban Browaeys <prahal@yahoo.com>"> <span class="fn">Alban Browaeys</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=134868" name="attach_134868" title="debounce lid events">attachment 134868</a> <a href="attachment.cgi?id=134868&action=edit" title="debounce lid events">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=103298&attachment=134868'>[review]</a>
debounce lid events

The patch remove the event before adding it anew. It applies against 1.8.3
which is the version I tested against (debian sid).

This fixes the issue that the same event is inserted twice into the list. That
we then ends up with a list item that points to itself.

I also safeguards the removal of this event listener by this
keyboard_is_monitored flag.

The flag tells we already attached this keyboard listener so that even if the
state is_closed is not switched yet we avoid duplicates.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>