summaryrefslogtreecommitdiff
path: root/src/core/prefs.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-03-23 23:58:48 -0400
committerraveit65 <[email protected]>2018-03-26 20:56:43 +0200
commit81fdb557657e922958236af2ccfbe44762fead1d (patch)
treeb9e8499d5661df0b9e97c768f2d28777b7594b49 /src/core/prefs.c
parent5bb0b3e08609ff03d3ab4d4dd14f952be9d09c25 (diff)
downloadmarco-81fdb557657e922958236af2ccfbe44762fead1d.tar.bz2
marco-81fdb557657e922958236af2ccfbe44762fead1d.tar.xz
Scale cursor size for HiDPI
Diffstat (limited to 'src/core/prefs.c')
-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