[gtk/wip/chergert/for-4-6: 40/56] macos: fix cursor blink time
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/for-4-6: 40/56] macos: fix cursor blink time
- Date: Wed, 16 Mar 2022 19:25:45 +0000 (UTC)
commit 2f873052f9664f7abe50c33b94b6f81646b0b14f
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 2 20:32:19 2022 -0800
macos: fix cursor blink time
The value from settings is for the duration of the blink period, not the
timeout. This fixes the blink lasting longer than 10 seconds.
gdk/macos/gdkmacosdisplay-settings.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gdk/macos/gdkmacosdisplay-settings.c b/gdk/macos/gdkmacosdisplay-settings.c
index e6714f0a14..53d6df0672 100644
--- a/gdk/macos/gdkmacosdisplay-settings.c
+++ b/gdk/macos/gdkmacosdisplay-settings.c
@@ -34,7 +34,7 @@ typedef struct
const char *font_name;
int xft_dpi;
int double_click_time;
- int cursor_blink_timeout;
+ int cursor_blink_time;
guint enable_animations : 1;
guint shell_shows_desktop : 1;
guint shell_shows_menubar : 1;
@@ -65,9 +65,9 @@ _gdk_macos_settings_load (GdkMacosSettings *settings)
ival = [defaults integerForKey:@"NSTextInsertionPointBlinkPeriod"];
if (ival > 0)
- settings->cursor_blink_timeout = ival;
+ settings->cursor_blink_time = ival;
else
- settings->cursor_blink_timeout = 1000;
+ settings->cursor_blink_time = 1000;
settings->primary_button_warps_slider =
[[NSUserDefaults standardUserDefaults] boolForKey:@"AppleScrollerPagingBehavior"] == YES;
@@ -124,9 +124,9 @@ _gdk_macos_display_get_setting (GdkMacosDisplay *self,
g_value_set_int (value, current_settings.xft_dpi);
ret = TRUE;
}
- else if (strcmp (setting, "gtk-cursor-blink-timeout") == 0)
+ else if (strcmp (setting, "gtk-cursor-blink-time") == 0)
{
- g_value_set_int (value, current_settings.cursor_blink_timeout);
+ g_value_set_int (value, current_settings.cursor_blink_time);
ret = TRUE;
}
else if (strcmp (setting, "gtk-double-click-time") == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]