<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=mclasen%40redhat.com" title="Matthias Clasen <mclasen@redhat.com>"> <span class="fn">Matthias Clasen</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Support HiDPI pointer cursors"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=746141">bug 746141</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 #299291 status</td>
           <td>none
           </td>
           <td>reviewed
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Support HiDPI pointer cursors"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=746141#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: Support HiDPI pointer cursors"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=746141">bug 746141</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=mclasen%40redhat.com" title="Matthias Clasen <mclasen@redhat.com>"> <span class="fn">Matthias Clasen</span></a>
</span></b>
        <pre>Review of <span class=""><a href="attachment.cgi?id=299291&action=diff" name="attach_299291" title="wayland: Support scaling of theme based cursors">attachment 299291</a> <a href="attachment.cgi?id=299291&action=edit" title="wayland: Support scaling of theme based cursors">[details]</a></span> <a href='review?bug=746141&attachment=299291'>[review]</a>:

::: gdk/wayland/gdkdisplay-wayland.c
@@ +623,3 @@
+  g_assert (scale >= 1);
+
+  theme = wayland_display->scaled_cursor_themes[scale - 2];

scale - 2 ?!
That seems to rely on the struct ordering to access the cursor_theme member
_before_ the array if scale is 1 ?

Can we just put it all in the array, and use scale - 1 here ?

@@ +634,3 @@
+                     wayland_display->cursor_theme_name, scale);
+          return NULL;
+        }

I guess this is where we would expect the theme to be stuffed in that array ?

::: gdk/wayland/gdkdisplay-wayland.h
@@ +44,3 @@

+#define GDK_WAYLAND_MAX_SCALED_THEMES 5
+#define GDK_WAYLAND_MAX_THEME_SCALE (GDK_WAYLAND_MAX_SCALED_THEMES + 1)

5 seems excessive. In practice, we're dealing with scales of 1 or 2 only.

@@ +75,2 @@
   struct wl_cursor_theme *cursor_theme;
+  struct wl_cursor_theme *scaled_cursor_themes[GDK_WAYLAND_MAX_SCALED_THEMES];

Nothing ever sets the scaled_cursor_themes, afaics.

::: gdk/wayland/gdkwindow-wayland.c
@@ -38,3 @@
 #include <errno.h>

-#define WL_SURFACE_HAS_BUFFER_SCALE 3

Moving these 'capability' defines to a single shared place is a good idea.
Might be nice to do as a cleanup patch beforehand.</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>