From bf418320b7e0c1659a768e439372d9eafb33c36b Mon Sep 17 00:00:00 2001 From: "Stefano D. Mtangoo" Date: Sat, 17 Feb 2018 19:10:11 +0100 Subject: [PATCH] Work around crash in wxStyledTextCtrl under Mac When not using double buffering, double-clicking to select text in the control results in crashes. Avoid this by using double-buffering under Mac, even though it shouldn't be necessary. This reverts the changes of cb799483b7cf19f0e2db5df857be5e79dafab38d under Mac. See #18085. --- src/stc/stc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index b4602db8da..620e0b9197 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -224,8 +224,9 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, // STC doesn't support RTL languages at all SetLayoutDirection(wxLayout_LeftToRight); - // Rely on native double buffering by default. -#if wxALWAYS_NATIVE_DOUBLE_BUFFER + // Rely on native double buffering by default, except under Mac where it + // doesn't work for some reason, see #18085. +#if wxALWAYS_NATIVE_DOUBLE_BUFFER && !defined(__WXMAC__) SetBufferedDraw(false); #else SetBufferedDraw(true);