On 1/5/26 10:46 AM, Stephan Witt wrote:
Am 03.01.2026 um 23:49 schrieb Stephan Witt via lyx-devel
<[email protected]>:
Am 03.01.2026 um 21:24 schrieb Richard Kimberly Heck
<[email protected]>:
On 1/3/26 2:26 PM, Stephan Witt wrote:
Am 03.01.2026 um 18:32 schrieb Richard Kimberly
Heck<[email protected]>:
On 1/3/26 12:23 PM, Paul Rubin wrote:
On 1/2/26 21:19, Tom Goldring wrote:
Is there any way to turn it off in MacOS 15.7.3 or any other
version? I find it intolerable. I tried the "Prefer non-blinking
cursor" in my System Settings, but it doesn't work in LyX.
This is a Qt setting. The following works on Linux Mint and may
be doable on MacOS.
1. Install the Qt 5 configuration tool (qt5ct on Linux).
2. Run the tool. If you get a warning about QT_QPA_PLATFORMTHEME
not being set, you have to add the line
QT_QPA_PLATFORMTHEME=qt5ct to an appropriate configuration
file and reboot. In my case, I was able to add it to
~/.config/qt5ct/qt5ct.conf. Other Linux users report putting
it in /etc/environment or other places. You'll have to do a
little research to find the appropriate file on a Mac.
3. Once the configuration tool is running without warnings, go
to the Interface tab and change "Cursor flash time" to 0ms.
Click Apply and then start LyX and confirm that the cursor is
rock solid.
Note that this will affect all apps on your system using Qt5, not
just LyX.
I am not sure if we use Qt5 or Qt6 with the OSX packages, but
qt6ct also exists.
Looking at the source code, we do seem to get the cursor flash
time from Qt, so I'd expect us to respect this setting wherever it
comes from. If it's <=0, we do not start the blinking.
We had a ticket long time ago for this:
#9287 ((Accessibility) It is not possible to disable the blinking
cursor) – The LyX Project <https://www.lyx.org/trac/ticket/9287>
lyx.org <https://www.lyx.org/trac/ticket/9287>
<https://www.lyx.org/trac/ticket/9287>
<trac.ico>
<https://www.lyx.org/trac/ticket/9287>
Right, and as you said elsewhere, there's a way to do this.
Looking at the code quickly, could the calls to
NSTextInsertionPointBlinkPeriod... be moved to
GuiWorkArea::startBlinkingCaret, and effectively take the place of
the calls there to QApplication::cursorFlashTime? That would make
the OSX version work pretty much like the other ones. In particular,
if this value were changed while LyX is running, we'd pick it up.
Also, this
#if defined(Q_OS_MAC)
int const cursor_time_on = NSTextInsertionPointBlinkPeriodOn();
int const cursor_time_off = NSTextInsertionPointBlinkPeriodOff();
if (cursor_time_on > 0 && cursor_time_off > 0) {
QApplication::setCursorFlashTime(cursor_time_on + cursor_time_off);
} else if (cursor_time_on <= 0 && cursor_time_off > 0) {
// Off is set and On is undefined of zero
QApplication::setCursorFlashTime(0);
} else if (cursor_time_off <= 0 && cursor_time_on > 0) {
// On is set and Off is undefined of zero
QApplication::setCursorFlashTime(0);
}
#endif
looks overly complicated. Why not just:
if (cursor_time_on > 0 && cursor_time_off > 0) {
QApplication::setCursorFlashTime(cursor_time_on + cursor_time_off);
} else
QApplication::setCursorFlashTime(0);
? The case where they are both zero seems not to be handled.
Yes, that’s intended. This is the standard situation. That way the Qt
defaults are used then.
The answer to the question regarding the move to
GuiWorkArea::startBlinkingCaret depends on the frequency of the
execution of this method and the cost of the calls to
NSTextInsertionPointBlinkPeriodOn/Off.
Stephan
Now I’ve searched for the answer and since the costs to the lookup of
defaults is minimal I made the attached patch.
1. it moves the check for the macos defaults to
GuiWorkArea::startBlinkingCaret and
2. adds the check for the new system preference.
Regarding part 1 - is this what you had in mind?
Yes. Just so that changing it would immediately change it in LyX.
Riki
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel