<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Submenus often get closed after ~2 seconds"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=768016#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] Submenus often get closed after ~2 seconds"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=768016">bug 768016</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=330579&action=diff" name="attach_330579" title="[PATCH] wayland: return child only in device_query_state()">attachment 330579</a> <a href="attachment.cgi?id=330579&action=edit" title="[PATCH] wayland: return child only in device_query_state()">[details]</a></span> <a href='review?bug=768016&attachment=330579'>[review]</a>
[PATCH] wayland: return child only in device_query_state()

On X11, device_query_state() uses XIQueryPointer() which will return a
child window only if the pointer is within an actual child of the given
window.

Wayland backend would return the pointer->focus window independently of
the given window, but that breaks the logic in get_device_state() and
later in gdk_window_get_device_position_double() because the window is
searched based on coordinates from another window without sibling
relationship, breaking gtkmenu sub-menus further down the line.

Fix the Wayland backend to mimic X11's XIQueryPointer() to return a
child only if really a child of the given window.

That's the most sensible thing to do to fix the issue, but the API here
seems to be modeled after the X11 implementation and the description of
gdk_window_get_device_position_double() is not entirely accurate.</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>