summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-23 23:58:48 -0400
committerMartin Wimpress <[email protected]>2018-03-26 21:27:43 +0100
commitf45d299364bbadf8ff5f11307bac711d4f42c2af (patch)
tree269a002ccea14cdd9e4c9283ecfed0061e2d5c02
parent03029b3d597b7b4962f4ad9398a36128958bba63 (diff)
downloadmarco-f45d299364bbadf8ff5f11307bac711d4f42c2af.tar.bz2
marco-f45d299364bbadf8ff5f11307bac711d4f42c2af.tar.xz
Scale cursor size for HiDPI
-rw-r--r--src/core/prefs.c6
1 files changed, 5 insertions, 1 deletions
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