X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a33203cb9f52a07df4d9c375c33d6cf3103cba7a..c3732409acc7a1e0b3cdb1f0a5dec7cc49a4b28b:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index f534906177..892f639501 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -17,8 +17,8 @@ #include -#include "wx/stc/stc.h" -#include "ScintillaWX.h" +#define Point macPoint // These names are also defined by some mac headers so +#define Style macStyle // change their names, and then undef before we need them #include #include @@ -26,6 +26,11 @@ #include #include +#undef Point +#undef Style + +#include "wx/stc/stc.h" +#include "ScintillaWX.h" //---------------------------------------------------------------------- @@ -179,6 +184,9 @@ void wxStyledTextCtrl::Create(wxWindow *parent, #endif SetBestFittingSize(size); + + // Reduces flicker on GTK+/X11 + SetBackgroundStyle(wxBG_STYLE_CUSTOM); } @@ -2782,9 +2790,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key);