@@ -611,7 +611,7 @@ public class SlickGreeter
611
611
stderr. printf (" [%+.2fs] %s %s\n " , log_timer. elapsed (), prefix, message);
612
612
}
613
613
614
- private static void check_hidpi ()
614
+ private static bool check_hidpi ()
615
615
{
616
616
try {
617
617
string output;
@@ -620,11 +620,13 @@ public class SlickGreeter
620
620
if (output == " 2" ) {
621
621
debug (" Activating HiDPI (2x scale ratio)" );
622
622
GLib . Environment . set_variable (" GDK_SCALE" , " 2" , true );
623
+ return true ;
623
624
}
624
625
}
625
626
catch (Error e){
626
627
warning (" Error while setting HiDPI support: %s " , e. message);
627
628
}
629
+ return false ;
628
630
}
629
631
630
632
private static void set_keyboard_layout ()
@@ -714,12 +716,15 @@ public class SlickGreeter
714
716
UGSettings . apply_conf_settings ();
715
717
716
718
var hidpi = UGSettings . get_string (UGSettings . KEY_ENABLE_HIDPI );
719
+ var cursor_scale = 1 ;
717
720
debug (" HiDPI support: %s " , hidpi);
718
721
if (hidpi == " auto" ) {
719
- check_hidpi ();
722
+ if (check_hidpi ())
723
+ cursor_scale = 2 ;
720
724
}
721
725
else if (hidpi == " on" ) {
722
726
GLib . Environment . set_variable (" GDK_SCALE" , " 2" , true );
727
+ cursor_scale = 2 ;
723
728
}
724
729
725
730
/* Set the keyboard layout */
@@ -799,8 +804,8 @@ public class SlickGreeter
799
804
}
800
805
var int_value = UGSettings . get_integer (UGSettings . KEY_CURSOR_THEME_SIZE );
801
806
if (int_value != 0 ) {
802
- debug (" Settings cursor theme size: %d " , int_value);
803
- settings. set (" gtk-cursor-theme-size" , int_value, null );
807
+ debug (" Settings cursor theme size: %d " , int_value * cursor_scale );
808
+ settings. set (" gtk-cursor-theme-size" , int_value * cursor_scale , null );
804
809
}
805
810
value = UGSettings . get_string (UGSettings . KEY_FONT_NAME );
806
811
if (value != " " ){
0 commit comments