From 2197f9d10e8841ab97d919ff6fcde5bb9721c6ce Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 11 Apr 2020 08:48:12 -0700 Subject: [PATCH] Match caret color to foreground color Fixes cursor visibility in text control with non-default foreground color See #18722 --- src/gtk/window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 87a8d62241..215c3ad625 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -5558,6 +5558,11 @@ void wxWindowGTK::GTKApplyWidgetStyle(bool forceStyle) wxGtkString(gdk_rgba_to_string(fg_sel)).c_str(), wxGtkString(gdk_rgba_to_string(bg_sel)).c_str()); + if (isFg) + { + g_string_append_printf(css, "*{caret-color:%s}", + wxGtkString(gdk_rgba_to_string(fg)).c_str()); + } if (isBg) { // make "undershoot" node background transparent,