<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=carlosg%40gnome.org" title="Carlos Garnacho <carlosg@gnome.org>"> <span class="fn">Carlos Garnacho</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Make it possible to use a window type hint to map as a subsurface"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=756496">bug 756496</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 #313179 status</td>
           <td>none
           </td>
           <td>reviewed
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Make it possible to use a window type hint to map as a subsurface"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=756496#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Make it possible to use a window type hint to map as a subsurface"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=756496">bug 756496</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=carlosg%40gnome.org" title="Carlos Garnacho <carlosg@gnome.org>"> <span class="fn">Carlos Garnacho</span></a>
</span></b>
        <pre>Review of <span class=""><a href="attachment.cgi?id=313179&action=diff" name="attach_313179" title="wayland: Clean up code determining how to map a window">attachment 313179</a> <a href="attachment.cgi?id=313179&action=edit" title="wayland: Clean up code determining how to map a window">[details]</a></span> <a href='review?bug=756496&attachment=313179'>[review]</a>:

Nice refactor overall, the warnings will be handy for future cases, and it's
clearer about which window gets which wayland roles.

::: gdk/wayland/gdkwindow-wayland.c
@@ +1329,3 @@
+                     window);
+
+          create_fallback = TRUE;

It indeed makes sense to fall back to xdg_surface. I wonder if this function
overall wouldn't be clearer if we had a window_has_role() that returns false if
a GdkWindow has no xdg_surface, xdg_popup or wl_subsurface. That way we could
defer the fallback create_xdg_surface() call to a common place at the end of
the function, instead of being called from several places.

@@ +1903,3 @@
   gdk_wayland_window_sync_parent (window);

+  if (should_map_as_subsurface (window))

here you dropped the visibility/parent checks, aren't they necessary anymore?
it looks to me like we could trigger untimely wl_subsurface creation (eg. when
the window is not visible yet)</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>