mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
prefs: Scale the root window cursor by the scale factor
This fixes small cursors on HiDPI displays.
This commit is contained in:
parent
4b5a503cee
commit
4fe66ce0a9
@ -1334,10 +1334,26 @@ meta_prefs_get_cursor_theme (void)
|
||||
return cursor_theme;
|
||||
}
|
||||
|
||||
static int
|
||||
get_scale_factor (void)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&value, G_TYPE_INT);
|
||||
|
||||
/* XXX: Should this be in ui/ ? Or MetaMonitorManager? */
|
||||
screen = gdk_screen_get_default ();
|
||||
if (gdk_screen_get_setting (screen, "gdk-window-scaling-factor", &value))
|
||||
return g_value_get_int (&value);
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
meta_prefs_get_cursor_size (void)
|
||||
{
|
||||
return cursor_size;
|
||||
return cursor_size * get_scale_factor ();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user