From e2035be13d4d834fb179b7228e176ff5d4aa1721 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sun, 6 Apr 2025 11:42:09 +0200 Subject: [PATCH] gtk3theme: Honor gtk-cursor-blink for whether blinking is on gtk-cursor-blink-time is in an interval 100..2500ms, GTK uses a dedicated boolean to determine whether blinking is on in the first place. Pick-to: 6.9 6.8 Change-Id: I8a5dff70b6b3fbeeab599cf50402532052afe8b7 Reviewed-by: Axel Spoerl --- src/plugins/platformthemes/gtk3/qgtk3theme.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp index 93aa9f33eb7..c1c1e623a27 100644 --- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp +++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp @@ -88,6 +88,7 @@ QGtk3Theme::QGtk3Theme() }; GtkSettings *settings = gtk_settings_get_default(); + SETTING_CONNECT("gtk-cursor-blink"); SETTING_CONNECT("gtk-cursor-blink-time"); SETTING_CONNECT("gtk-double-click-distance"); SETTING_CONNECT("gtk-double-click-time"); @@ -119,7 +120,10 @@ QVariant QGtk3Theme::themeHint(QPlatformTheme::ThemeHint hint) const { switch (hint) { case QPlatformTheme::CursorFlashTime: - return QVariant(gtkSetting("gtk-cursor-blink-time")); + if (gtkSetting("gtk-cursor-blink")) + return QVariant(gtkSetting("gtk-cursor-blink-time")); + else + return 0; case QPlatformTheme::MouseDoubleClickDistance: return QVariant(gtkSetting("gtk-double-click-distance")); case QPlatformTheme::MouseDoubleClickInterval: