MGR: Update my fix for wxListCtrl / CBOINCListCtrl flicker on Mac (commit f8966bf) to match the fix made to wxWidgets trunk by wxWidgets personnel, as described in <http://trac.wxwidgets.org/ticket/16334#comment:2>.

This commit is contained in:
Charlie Fenton 2014-06-19 01:43:42 -07:00
parent b415b466c6
commit 6a01506738
2 changed files with 15 additions and 15 deletions

View File

@ -242,7 +242,7 @@ void CBOINCListCtrl::DrawProgressBars()
wxClientDC dc(this); wxClientDC dc(this);
m_bProgressBarEventPending = false; m_bProgressBarEventPending = false;
#else #else
wxWindowDC dc(GetMainWin()); // Available only in wxGenericListCtrl wxClientDC dc(GetMainWin()); // Available only in wxGenericListCtrl
#endif #endif
if (progressColumn < 0) { if (progressColumn < 0) {

View File

@ -31,6 +31,7 @@
# Enable wxWidgets asserts in Release build 3/6/14 # Enable wxWidgets asserts in Release build 3/6/14
# Disable all wxWidgets debug support in Release build (revert 3/6/14 change) 5/29/14 # Disable all wxWidgets debug support in Release build (revert 3/6/14 change) 5/29/14
# Fix wxListCtrl flicker when resizing columns in wxCocoa 3.0.0 6/13/14 # Fix wxListCtrl flicker when resizing columns in wxCocoa 3.0.0 6/13/14
# Revise fix for wxListCtrl flicker to match the fix in wxWidgets trunk 6/19/14
# #
## This script requires OS 10.6 or later ## This script requires OS 10.6 or later
## ##
@ -118,25 +119,24 @@ fi
echo "" echo ""
# Patch wxWidgets-3.0.0/src/generic/listctrl.cpp to eliminate flicker when resizing columns # Patch wxWidgets-3.0.0/src/osx/carbon/dcclient.cpp to eliminate flicker when resizing columns
if [ ! -f src/generic/listctrl.cpp.orig ]; then if [ ! -f src/osx/carbon/dcclient.cpp.orig ]; then
cat >> /tmp/listctrl_cpp_diff << ENDOFFILE cat >> /tmp/listctrl_cpp_diff << ENDOFFILE
--- src/generic/listctrl.cpp 2013-11-11 05:10:39.000000000 -0800 --- src/osx/carbon/dcclient.cpp 2014-06-12 22:15:31.000000000 -0700
+++ src/generic/listctrl_patched.cpp 2014-06-13 03:44:28.000000000 -0700 +++ src/osx/carbon/dcclient-patched.cpp 2014-06-19 01:04:58.000000000 -0700
@@ -3632,7 +3632,7 @@ @@ -174,7 +174,7 @@
wxClientDCImpl::~wxClientDCImpl()
{ {
const int lineHeight = GetLineHeight(); - if( GetGraphicsContext() && GetGraphicsContext()->GetNativeContext() )
+if( GetGraphicsContext() && GetGraphicsContext()->GetNativeContext() && !m_release )
- wxClientDC dc( this ); Flush();
+ wxWindowDC dc( this ); }
dc.SetFont( GetFont() );
const size_t count = GetItemCount();
ENDOFFILE ENDOFFILE
patch -bfi /tmp/listctrl_cpp_diff src/generic/listctrl.cpp patch -bfi /tmp/listctrl_cpp_diff src/osx/carbon/dcclient.cpp
rm -f /tmp/listctrl_cpp_diff rm -f /tmp/listctrl_cpp_diff
else else
echo "src/generic/listctrl.cpp already patched" echo "src/osx/carbon/dcclient.cpp already patched"
fi fi
echo "" echo ""