From b443d58497d6d2cfce83c3882ff0cf0ce45914d1 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 7 Apr 2022 13:08:52 +1000 Subject: Bug [#2322] Fix partial updates and non-responsive scroll bars on Xorg. Also fixes bugs [#2196] and [#2312]. --- src/Editor.cxx | 7 ++++++- src/Editor.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index e7459e477..d5e6a92ff 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1861,7 +1861,7 @@ long Editor::TextWidth(uptr_t style, const char *text) { // Empty method is overridden on GTK+ to show / hide scrollbars void Editor::ReconfigureScrollBars() {} -void Editor::SetScrollBars() { +void Editor::ChangeScrollBars() { RefreshStyleData(); const Sci::Line nMax = MaxScrollPos(); @@ -1885,6 +1885,11 @@ void Editor::SetScrollBars() { //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); } +void Editor::SetScrollBars() { + // Overridden on GTK to defer to idle + ChangeScrollBars(); +} + void Editor::ChangeSize() { DropGraphics(); SetScrollBars(); diff --git a/src/Editor.h b/src/Editor.h index a430a23d4..095131c76 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -413,7 +413,8 @@ protected: // ScintillaBase subclass needs access to much of Editor virtual void SetHorizontalScrollPos() = 0; virtual bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) = 0; virtual void ReconfigureScrollBars(); - void SetScrollBars(); + void ChangeScrollBars(); + virtual void SetScrollBars(); void ChangeSize(); void FilterSelections(); -- cgit v1.2.3