From c0265297e0de939851c1711546a537251de44624 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Sat, 24 Mar 2018 00:45:02 -0400 Subject: Scale cursor size for HiDPI when changing themes --- capplets/common/mate-theme-info.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'capplets') diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c index 678e11fd..3012c9b0 100644 --- a/capplets/common/mate-theme-info.c +++ b/capplets/common/mate-theme-info.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -383,6 +384,8 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri) str = mate_desktop_item_get_string(meta_theme_ditem, CURSOR_THEME_KEY); + GdkWindow *window = gdk_get_default_root_window (); + gint scale = gdk_window_get_scale_factor (window); if (str != NULL) { meta_theme_info->cursor_theme_name = g_strdup(str); @@ -399,6 +402,7 @@ MateThemeMetaInfo* mate_theme_read_meta_theme(GFile* meta_theme_uri) meta_theme_info->cursor_theme_name = g_strdup("default"); meta_theme_info->cursor_size = 18; } + meta_theme_info->cursor_size *= scale; str = mate_desktop_item_get_string(meta_theme_ditem, APPLICATION_FONT_KEY); -- cgit v1.2.1