[Wayland-bugs] [Bug 746141] wayland: Support HiDPI pointer cursors
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Mar 13 06:16:44 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Matthias Clasen <mclasen at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #299291|none |reviewed
status| |
--- Comment #5 from Matthias Clasen <mclasen at redhat.com> ---
Review of attachment 299291:
::: 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150313/1695488c/attachment.html>
More information about the wayland-bugs
mailing list