Download it now!
Bug 100706 - Cannot Stop Blinking Text Cursor in macOS
Summary: Cannot Stop Blinking Text Cursor in macOS
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Mac OS X (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.0.0 target:6.4.3
Keywords: accessibility
Depends on:
Blocks: a11y-macOS
  Show dependency treegraph
 
Reported: 2016-06-30 21:35 UTC by MarjaE
Modified: 2020-03-21 13:44 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarjaE 2016-06-30 21:35:31 UTC
In OS X, there doesn't seem to be any way to disable a blinking cursor in LibreOffice Writer or LibreOffice Calc.

It is possible to change the system settings, but this doesn't stop the blinking in LibreOffice in OS X. I have been able to stop the blinking in Textedit, using the Mac's settings, and in Firefox, using Firefox's settings. I understand that users *have* been able to use the system settings to stop the blinking in Linux and Windows.
Comment 1 Alex Thurgood 2016-07-01 08:27:03 UTC
For any devs interested, see :

https://discussions.apple.com/thread/6720434?start=0&tstart=0

in particular :

"Also note that this will only work for applications and text fields that are coded with Apple’s text view coding objects, so programs that use alternative text handling routines may not show a difference in blink rate."


The basic commands for system settings can be found here :

http://www.macissues.com/2014/12/08/how-to-change-your-macs-text-cursor-blink-rate/

Examples :
defaults write -g NSTextInsertionPointBlinkPeriodOn -float 200
defaults write -g NSTextInsertionPointBlinkPeriodOff -float 200

Note that many apps do not respond to these settings, e.g. Safari and MSOffice are reported as being unaffected.

Confirming enhancement request, but don't expect any changes soon as this would appear to require touching fundamental parts of the text rendering engine.
Comment 2 MarjaE 2016-10-15 03:31:19 UTC
The NSText fix *only* works in NSText.

I think OS X/MacOS may use Webkit to render LibreOffice.
Comment 3 steve -_- 2017-01-15 13:00:35 UTC
How do you get a blinking cursor? This is unclear from your description. Is that intended behavior or a macOS bug? I never saw a blinking cursor on macOS.
Comment 4 MarjaE 2017-01-15 17:44:55 UTC
How do you *not* get a blinking cursor in OS X?

Apple's webkit rendering makes cursors blink, without allowing users to change the blink rate. (LibreOffice, Pages, Safari, etc. use this.) Apple's nstext rendering makes cursors blink by default, but allows users to change the blink rate using command-line settings. (NeoOffice, Textedit, etc. seem to use this. NeoOffice uses the older version of the blink rate settings.)

I switched to NeoOffice to escape the accursed thing. Now I can work without disorientation, trouble seeing what I'm working on, migraines, etc.

It would probably be too much trouble to switch LibreOffice to nstext. It might be easier to use wewbkit with its own blink rate settings, like Firefox does, but I am not a programmer.
Comment 5 steve -_- 2017-01-15 18:17:33 UTC
not mouse cursor but text cursor. aha, adjusting title.

blinking text cursor is default iirc. why change that? and when changing system wide setting, where is that done?

I tend to think, this enhancement request will never happen to be honest. there's a ton of more important macOS specific chances to be done first.
Comment 6 steve -_- 2017-01-15 18:20:04 UTC
can you please give macOS + LO version you are seeing this problem with.
Comment 7 MarjaE 2017-01-15 18:28:50 UTC
Also affects
Comment 8 MarjaE 2017-01-15 18:37:23 UTC
(In reply to steve -_- from comment #5)
> not mouse cursor but text cursor. aha, adjusting title.
> 
> blinking text cursor is default iirc. why change that?

Accessibility.

Different people have different needs, but I'm not the only one who has trouble with blinking pain: http://www.jurta.org/en/prog/noblink or http://www.macissues.com/2014/12/08/how-to-change-your-macs-text-cursor-blink-rate/

With my neurology, pain hurts, and blinking, flashing, and/or strobing objects, including these cursors, make it harder to see and therefore to work, and blinking, flashing, and/or strobing objects, including these cursors, can trigger my migraines. (Obviously these aren't as painful or nearly as dangerous as turn signals, pre-dawn strobe bombardments, etc., but these don't help.)

I briefly reverted the title change because I've encountered the same bug in Draw, but it *mostly* relates to text boxes there, and in Calc.

> and when changing
> system wide setting, where is that done?

In the terminal window.

> 
> I tend to think, this enhancement request will never happen to be honest.
> there's a ton of more important macOS specific chances to be done first.
Comment 9 Alex ARNAUD 2017-01-16 20:25:37 UTC
Dear all,

On Debian 8.7 with LibreOffice 5.2.4 GTK2 when I disable blinking text cursor it works correctly.

Best regards.
Comment 10 MarjaE 2017-05-20 18:18:13 UTC
At this point, LibreOffice crashes on opening in MacOS, but there are some workarounds. The crashes are probably more important than the cursors.

I think Apple *doubled* their cursor blink rates in 10.12.4. For me, that pushes LibreOffice 5.2.2.2 from painful to blinding and unusable. For some other users, it could push it from distracting to painful. I mostly use NeoOffice but had been using LibreOffice for certain functions such as color handling and search-and-replace which NeoOffice doesn't do as well.
Comment 11 MarjaE 2017-05-20 18:19:19 UTC
An eyepatch does provide some protection.
Comment 12 Telesto 2018-02-13 19:29:44 UTC
The blinking speed appears to be hard coded. So increasing number should slowdown the cursor (did test it).  
https://opengrok.libreoffice.org/xref/core/vcl/osx/salframe.cxx#1203
Comment 13 MarjaE 2018-02-13 20:47:11 UTC
Which versions is the setting available in? I can't find it under expert configuration in 5.4.4.2.
Comment 14 Alex Thurgood 2018-02-14 10:50:44 UTC
(In reply to MarjaE from comment #13)
> Which versions is the setting available in? I can't find it under expert
> configuration in 5.4.4.2.

@Marja: I'm assuming that Telesto changed it manually in his code tree and recompiled LibreOffice. His comment was to test his theory that it could indeed be changed and have the desired effect.
Comment 15 Alex Thurgood 2019-10-28 10:16:48 UTC
(In reply to Alex Thurgood from comment #14)
> (In reply to MarjaE from comment #13)
> > Which versions is the setting available in? I can't find it under expert
> > configuration in 5.4.4.2.
> 
> @Marja: I'm assuming that Telesto changed it manually in his code tree and
> recompiled LibreOffice. His comment was to test his theory that it could
> indeed be changed and have the desired effect.

And it appears that the line in question in the code is now:

https://opengrok.libreoffice.org/xref/core/vcl/osx/salframe.cxx?r=7e4358a0#1282


aStyleSettings.SetCursorBlinkTime( 500 )
Comment 16 Alex Thurgood 2019-10-28 10:18:39 UTC
What could be made to happen then is that this parameter, instead of being hardcoded, become a configurable item accessible via the advanced configuration. I have no idea how much work that might represent.
Comment 17 Julien Nabet 2020-03-20 22:13:07 UTC
git grepping SetCursorBlinkTime, it seems we use "flash_time" related with QApplication::cursorFlashTime() in kf5/qt5, in gtk3 we use blink_time related to "gtk-cursor-blink-time", in Windows we use Windows function "GetCaretBlinkTime".
For MacOS part, we indeed need to follow what Alex quoted in https://bugs.documentfoundation.org/show_bug.cgi?id=100706#c1


Xisco/Heiko: what about adding an option to set the blinking cursor rate on Accessibility/Miscellaneous Options? (a number in ms) perhaps a spinbutton with min max range?

Let's increase a bit the importance since it may have a real impact, I mean a physical impact not just aesthetics, for some people.
Comment 18 Commit Notification 2020-03-21 09:19:18 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7f45cbace44141e22c159dc2216fefd787e14d1f

tdf#100706: get blink cursor delay for MacOS

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Julien Nabet 2020-03-21 09:21:07 UTC
I gave it a try with:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=7f45cbace44141e22c159dc2216fefd787e14d1f

Could someone give a try either by putting his/her master sources updated locally or after 24/48h when a daily build with this patch will be available?

Indeed, I don't have a Mac so couldn't test it.
Comment 20 Julien Nabet 2020-03-21 09:33:13 UTC
Just for the record, I submitted the patch on gerrit for 6.4 branch here:
https://gerrit.libreoffice.org/c/core/+/90855

It may be useful for those who build locally 6.4 branch.
Comment 21 Heiko Tietze 2020-03-21 12:13:15 UTC
(In reply to Julien Nabet from comment #17)
> Xisco/Heiko: what about adding an option to set the blinking cursor rate on
> Accessibility/Miscellaneous Options? (a number in ms) perhaps a spinbutton
> with min max range?

Don't see a reason to add options that override system settings. So rather not.
Comment 22 Commit Notification 2020-03-21 13:40:51 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/6a39d880cc0d4a7bcfcbf65cd80d0d09d6be241c

tdf#100706: get blink cursor delay for MacOS

It will be available in 6.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.