From 719493e14bd4c9222e64da2006ec496e7c0ba7b1 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 19 Feb 2005 23:45:18 +0000 Subject: [PATCH] On wxMac don't call Refresh from FullPaint as that is the biggest cause of the performance problems. Instead call refresh when the AutoComp window is displayed or hidden to ensure that borders, etc. are drawn/erased as needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/PlatWX.cpp | 8 ++++++++ contrib/src/stc/ScintillaWX.cpp | 3 +++ src/stc/PlatWX.cpp | 8 ++++++++ src/stc/ScintillaWX.cpp | 3 +++ 4 files changed, 22 insertions(+) diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index b3232e6aa5..606d9d809b 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -806,6 +806,14 @@ public: event.Skip(); } +#ifdef __WXMAC__ + virtual bool Show(bool show = true) { + bool rv = wxWindow::Show(show); + GetParent()->Refresh(false); + return rv; + } +#endif + void OnActivate(wxListEvent& WXUNUSED(event)) { doubleClickAction(doubleClickActionData); } diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index 50773daee1..779ac2a3df 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -636,6 +636,7 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar LexerManager::GetInstance()->Load((const char*)lParam); break; #endif + default: return ScintillaBase::WndProc(iMessage, wParam, lParam); } @@ -983,7 +984,9 @@ void ScintillaWX::DoDragLeave() { // Force the whole window to be repainted void ScintillaWX::FullPaint() { +#ifndef __WXMAC__ stc->Refresh(false); +#endif stc->Update(); } diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index b3232e6aa5..606d9d809b 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -806,6 +806,14 @@ public: event.Skip(); } +#ifdef __WXMAC__ + virtual bool Show(bool show = true) { + bool rv = wxWindow::Show(show); + GetParent()->Refresh(false); + return rv; + } +#endif + void OnActivate(wxListEvent& WXUNUSED(event)) { doubleClickAction(doubleClickActionData); } diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index 50773daee1..779ac2a3df 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -636,6 +636,7 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar LexerManager::GetInstance()->Load((const char*)lParam); break; #endif + default: return ScintillaBase::WndProc(iMessage, wParam, lParam); } @@ -983,7 +984,9 @@ void ScintillaWX::DoDragLeave() { // Force the whole window to be repainted void ScintillaWX::FullPaint() { +#ifndef __WXMAC__ stc->Refresh(false); +#endif stc->Update(); } -- 2.45.2