diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index a0ed931021..b2578a4bd8 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -5436,6 +5436,11 @@ void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) { m_swx->DoInvalidateStyleData(); + // trigger a cursor change, so any cursors created by wxWidgets (like reverse arrow) will be recreated + const int oldCursor = GetSTCCursor(); + SetSTCCursor(-1); + SetSTCCursor(oldCursor); + // adjust the margins to the new DPI for ( int i = 0; i < SC_MAX_MARGIN; ++i ) { diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 4ea7df2d78..35210cbf1b 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -963,6 +963,11 @@ void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) { m_swx->DoInvalidateStyleData(); + // trigger a cursor change, so any cursors created by wxWidgets (like reverse arrow) will be recreated + const int oldCursor = GetSTCCursor(); + SetSTCCursor(-1); + SetSTCCursor(oldCursor); + // adjust the margins to the new DPI for ( int i = 0; i < SC_MAX_MARGIN; ++i ) {