From 4cdbdf0a84d7fe4c028f55dc691691b09819dc78 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 21 May 2020 17:37:28 +0200 Subject: [PATCH] LibGUI: Always paint the cursor visible when focusing a TextEditor If the cursor happened to be blinking in the invisible state, it would take 500ms before we actually see the cursor in a newly focused editor widget. This patch makes it show up right away. --- Libraries/LibGUI/TextEditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp index 15f38e106a7..ab884c1c6f8 100644 --- a/Libraries/LibGUI/TextEditor.cpp +++ b/Libraries/LibGUI/TextEditor.cpp @@ -1086,6 +1086,7 @@ void TextEditor::set_cursor(const TextPosition& a_position) void TextEditor::focusin_event(Core::Event&) { + m_cursor_state = true; update_cursor(); start_timer(500); }