<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [wayland] gedit killed by protocol error "Invalid anchor rectangle size""
   href="https://bugzilla.gnome.org/show_bug.cgi?id=777176">bug 777176</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;">Attachment #343383 status</td>
           <td>accepted-commit_now
           </td>
           <td>none
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Attachment #343383 is obsolete</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [wayland] gedit killed by protocol error "Invalid anchor rectangle size""
   href="https://bugzilla.gnome.org/show_bug.cgi?id=777176#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [wayland] gedit killed by protocol error "Invalid anchor rectangle size""
   href="https://bugzilla.gnome.org/show_bug.cgi?id=777176">bug 777176</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=343414&action=diff" name="attach_343414" title="[PATCH v2] wayland: avoid 0 width/height anchor rectangle">attachment 343414</a> <a href="attachment.cgi?id=343414&action=edit" title="[PATCH v2] wayland: avoid 0 width/height anchor rectangle">[details]</a></span> <a href='review?bug=777176&attachment=343414'>[review]</a>
[PATCH v2] wayland: avoid 0 width/height anchor rectangle

Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.
--
v2: Move the trickery to a separate sanitize_anchor_rect() function
    Compensate the position if the size is changed
    Fix typo in commit message</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>