Fix WriteText() not scrolling to bottom with GTK >= 3.14

The introduction of scrollbar animations broke scroll-to-end functionality when
large amounts of text are written, due to interactions with GtkTextView's
background layout. Work around this by scrolling after the layout has finished.
See #18864
This commit is contained in:
Paul Cornett
2020-10-02 11:10:14 -07:00
parent d18e7718fd
commit aef3976e13
2 changed files with 49 additions and 15 deletions

View File

@@ -143,6 +143,7 @@ public:
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
void GTKOnTextChanged() wxOVERRIDE;
void GTKAfterLayout();
protected:
// overridden wxWindow virtual methods
@@ -216,8 +217,9 @@ private:
// a dummy one when frozen
GtkTextBuffer *m_buffer;
GtkTextMark* m_showPositionOnThaw;
GtkTextMark* m_showPositionDefer;
GSList* m_anonymousMarkList;
unsigned m_afterLayoutId;
// For wxTE_AUTO_URL
void OnUrlMouseEvent(wxMouseEvent&);