From: Robin Dunn Date: Mon, 2 Apr 2007 21:15:27 +0000 (+0000) Subject: Always use wxHSCROLL|wxVSCROLL. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a0421c774c58f636901c792aef915b8bb8489117 Always use wxHSCROLL|wxVSCROLL. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index 3b7d9bfc8f..7cde4f12f2 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, long style, const wxString& name) { -#ifdef __WXMAC__ style |= wxVSCROLL | wxHSCROLL; -#endif if (!wxControl::Create(parent, id, pos, size, style | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name)) @@ -3118,6 +3116,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { #endif bool skip = ((ctrl || alt) && ! (ctrl && alt)); +#if wxUSE_UNICODE + // apparently if we don't do this, Unicode keys pressed after non-char + // ASCII ones (e.g. Enter, Tab) are not taken into account (patch 1615989) + if (m_lastKeyDownConsumed && evt.GetUnicodeKey() > 255) + m_lastKeyDownConsumed = false; +#endif + if (!m_lastKeyDownConsumed && !skip) { #if wxUSE_UNICODE int key = evt.GetUnicodeKey(); diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index af1773ddeb..8275b92ce7 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, long style, const wxString& name) { -#ifdef __WXMAC__ style |= wxVSCROLL | wxHSCROLL; -#endif if (!wxControl::Create(parent, id, pos, size, style | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name)) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 3b7d9bfc8f..7cde4f12f2 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, long style, const wxString& name) { -#ifdef __WXMAC__ style |= wxVSCROLL | wxHSCROLL; -#endif if (!wxControl::Create(parent, id, pos, size, style | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name)) @@ -3118,6 +3116,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { #endif bool skip = ((ctrl || alt) && ! (ctrl && alt)); +#if wxUSE_UNICODE + // apparently if we don't do this, Unicode keys pressed after non-char + // ASCII ones (e.g. Enter, Tab) are not taken into account (patch 1615989) + if (m_lastKeyDownConsumed && evt.GetUnicodeKey() > 255) + m_lastKeyDownConsumed = false; +#endif + if (!m_lastKeyDownConsumed && !skip) { #if wxUSE_UNICODE int key = evt.GetUnicodeKey(); diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index af1773ddeb..8275b92ce7 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent, long style, const wxString& name) { -#ifdef __WXMAC__ style |= wxVSCROLL | wxHSCROLL; -#endif if (!wxControl::Create(parent, id, pos, size, style | wxWANTS_CHARS | wxCLIP_CHILDREN, wxDefaultValidator, name))