Skip to content

winit: Honor system cursor blink rate in the winit backend #11617

Open
ogoffart wants to merge 2 commits intomasterfrom
olivier/fix-#11597
Open

winit: Honor system cursor blink rate in the winit backend #11617
ogoffart wants to merge 2 commits intomasterfrom
olivier/fix-#11597

Conversation

@ogoffart
Copy link
Copy Markdown
Member

@ogoffart ogoffart commented May 4, 2026

Query the platform's cursor blink settings instead of using a hardcoded
1000ms cycle.

  • Windows: read GetCaretBlinkTime() from Win32
  • macOS: read NSTextInsertionPointBlinkPeriod from NSUserDefaults
  • Linux: query org.gnome.desktop.interface cursor-blink and
    cursor-blink-time via the XDG desktop settings portal, using the
    existing async D-Bus watcher

On Linux the value is stored on SharedBackendData and read asynchronously
alongside color scheme and accent color. It updates live when the user
changes the setting.

Fixes: #11597

The module handles color scheme, accent color, and will soon handle
cursor blink settings. The new name better reflects its scope.

Also rename the cfg alias from use_winit_theme to xdg_desktop_settings
(with inverted polarity) for consistency with the module name.
@ogoffart
Copy link
Copy Markdown
Member Author

ogoffart commented May 4, 2026

(I actually did not test yet if this actually works.)

@ogoffart ogoffart force-pushed the olivier/fix-#11597 branch from a01d59b to e00782b Compare May 4, 2026 16:53
@DataTriny
Copy link
Copy Markdown
Contributor

Works on Windows 11: tested running the Gallery example multiple times while changing the setting in the accessibility settings page. Setting the value to 0% correctly disable the blinking completely.

Query the platform's cursor blink settings instead of using a hardcoded
1000ms cycle.

 - Windows: read GetCaretBlinkTime() from Win32
 - macOS: read NSTextInsertionPointBlinkPeriod from NSUserDefaults
 - Linux: query org.gnome.desktop.interface cursor-blink and
   cursor-blink-time via the XDG desktop settings portal, using the
   existing async D-Bus watcher

On Linux the value is stored on SharedBackendData and read asynchronously
alongside color scheme and accent color. It updates live when the user
changes the setting.

Fixes: #11597
@ogoffart ogoffart force-pushed the olivier/fix-#11597 branch from e00782b to 54a75ef Compare May 4, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: Slint 1.16 does not honor cursor blink settings anymore

3 participants