[LyX/master] Never not show caret when window does not have focus

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed May 3 09:18:06 UTC 2023


commit 21dcb4782f19685e6fcab93dfbbf3809fc9b249e
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed May 3 12:22:52 2023 +0200

    Never not show caret when window does not have focus
    
    A non blinking cursor could appear when hovering on inset button.
    
    Fixes bug #12762.
---
 src/frontends/qt/GuiWorkArea.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 1a3a9c0..d634f83 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -474,8 +474,9 @@ void GuiWorkArea::Private::resizeBufferView()
 
 void GuiWorkArea::Private::resetCaret()
 {
-	// Don't start blinking if the cursor isn't on screen.
-	if (!buffer_view_->caretInView())
+	// Don't start blinking if the cursor isn't on screen or the window
+	// does not have focus
+	if (!buffer_view_->caretInView() || !p->hasFocus())
 		return;
 
 	// completion indicator


More information about the lyx-cvs mailing list