From f45d299364bbadf8ff5f11307bac711d4f42c2af Mon Sep 17 00:00:00 2001
From: Victor Kareh <vkareh@vkareh.net>
Date: Fri, 23 Mar 2018 23:58:48 -0400
Subject: Scale cursor size for HiDPI

---
 src/core/prefs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/prefs.c b/src/core/prefs.c
index 021ad874..e376089c 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -27,6 +27,7 @@
 #include "prefs.h"
 #include "ui.h"
 #include "util.h"
+#include <gdk/gdk.h>
 #include <gio/gio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -1097,7 +1098,10 @@ meta_prefs_get_cursor_theme (void)
 int
 meta_prefs_get_cursor_size (void)
 {
-  return cursor_size;
+  GdkWindow *window = gdk_get_default_root_window ();
+  gint scale = gdk_window_get_scale_factor (window);
+
+  return cursor_size * scale;
 }
 
 gboolean
-- 
cgit v1.2.1