Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff -ruN wxPython-src-3.0.2.0/Makefile.in wxPython-src-3.0.2-1.0/Makefile.in
--- wxPython-src-3.0.2.0/Makefile.in 2014-10-08 10:51:06.000000000 -0600
+++ wxPython-src-3.0.2-1.0/Makefile.in 2015-05-20 18:54:34.000000000 -0600
@@ -14645,7 +14645,7 @@
monodll_carbon_frame.o \
monodll_carbon_mdi.o \
monodll_carbon_metafile.o \
- monodll_carbon_overlay.o \
+ monodll_osx_cocoa_overlay.o \
monodll_carbon_popupwin.o \
monodll_carbon_renderer.o \
monodll_carbon_settings.o \
@@ -14792,7 +14792,7 @@
monolib_carbon_frame.o \
monolib_carbon_mdi.o \
monolib_carbon_metafile.o \
- monolib_carbon_overlay.o \
+ monolib_osx_cocoa_overlay.o \
monolib_carbon_popupwin.o \
monolib_carbon_renderer.o \
monolib_carbon_settings.o \
@@ -14939,7 +14939,7 @@
coredll_carbon_frame.o \
coredll_carbon_mdi.o \
coredll_carbon_metafile.o \
- coredll_carbon_overlay.o \
+ coredll_osx_cocoa_overlay.o \
coredll_carbon_popupwin.o \
coredll_carbon_renderer.o \
coredll_carbon_settings.o \
@@ -15071,7 +15071,7 @@
corelib_carbon_frame.o \
corelib_carbon_mdi.o \
corelib_carbon_metafile.o \
- corelib_carbon_overlay.o \
+ corelib_osx_cocoa_overlay.o \
corelib_carbon_popupwin.o \
corelib_carbon_renderer.o \
corelib_carbon_settings.o \
@@ -17818,6 +17818,9 @@
monodll_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm
+monodll_osx_cocoa_overla.o: $(srcdir)/src/osx/cocoa/overlay.mm $(MONODLL_ODEP)
+ $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm
+
monodll_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm
@@ -21736,8 +21739,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monodll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(MONODLL_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@monodll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
@@ -23695,6 +23698,9 @@
monolib_osx_cocoa_notebook.o: $(srcdir)/src/osx/cocoa/notebook.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/notebook.mm
+monolib_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(MONOLIB_ODEP)
+ $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm
+
monolib_osx_cocoa_radiobut.o: $(srcdir)/src/osx/cocoa/radiobut.mm $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/radiobut.mm
@@ -33652,8 +33658,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(COREDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
@@ -38035,8 +38041,8 @@
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_osx_cocoa_overlay.o: $(srcdir)/src/osx/cocoa/overlay.mm $(CORELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/cocoa/overlay.mm
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_carbon_overlay.o: $(srcdir)/src/osx/carbon/overlay.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/carbon/overlay.cpp
diff -ruN wxPython-src-3.0.2.0/configure wxPython-src-3.0.2-1.0/configure
--- wxPython-src-3.0.2.0/configure 2014-10-08 10:51:06.000000000 -0600
+++ wxPython-src-3.0.2-1.0/configure 2015-05-20 18:56:11.000000000 -0600
@@ -29176,7 +29176,7 @@
*-*-darwin* )
install_name_tool=`which ${HOST_PREFIX}install_name_tool`
if test "$install_name_tool" -a -x "$install_name_tool"; then
- DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
+ DYLIB_RPATH_POSTLINK=""
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
@@ -29189,7 +29189,7 @@
done
EOF
chmod +x change-install-names
- DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib"
+ DYLIB_RPATH_INSTALL=""
fi
HEADER_PAD_OPTION="-headerpad_max_install_names"
diff -ruN wxPython-src-3.0.2.0/configure.in wxPython-src-3.0.2-1.0/configure.in
--- wxPython-src-3.0.2.0/configure.in 2014-10-08 10:51:06.000000000 -0600
+++ wxPython-src-3.0.2-1.0/configure.in 2015-05-20 18:56:11.000000000 -0600
@@ -3772,7 +3772,7 @@
*-*-darwin* )
install_name_tool=`which ${HOST_PREFIX}install_name_tool`
if test "$install_name_tool" -a -x "$install_name_tool"; then
- DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
+ DYLIB_RPATH_POSTLINK=""
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
@@ -3785,7 +3785,7 @@
done
EOF
chmod +x change-install-names
- DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib"
+ DYLIB_RPATH_INSTALL=""
fi
dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error:
diff -ruN wxPython-src-3.0.2.0/include/wx/osx/cocoa/private/overlay.h wxPython-src-3.0.2-1.0/include/wx/osx/cocoa/private/overlay.h
--- wxPython-src-3.0.2.0/include/wx/osx/cocoa/private/overlay.h 2013-12-16 06:42:30.000000000 -0700
+++ wxPython-src-3.0.2-1.0/include/wx/osx/cocoa/private/overlay.h 2015-05-20 18:55:46.000000000 -0600
@@ -41,15 +41,8 @@
void CreateOverlayWindow();
WXWindow m_overlayWindow;
- WXWindow m_overlayParentWindow;
- CGContextRef m_overlayContext ;
// we store the window in case we would have to issue a Refresh()
wxWindow* m_window ;
-
- int m_x ;
- int m_y ;
- int m_width ;
- int m_height ;
} ;
#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
diff -ruN wxPython-src-3.0.2.0/include/wx/osx/glcanvas.h wxPython-src-3.0.2-1.0/include/wx/osx/glcanvas.h
--- wxPython-src-3.0.2.0/include/wx/osx/glcanvas.h 2013-12-16 06:42:30.000000000 -0700
+++ wxPython-src-3.0.2-1.0/include/wx/osx/glcanvas.h 2015-05-20 18:55:38.000000000 -0600
@@ -88,6 +88,9 @@
// update the view port of the current context to match this window
void SetViewport();
+ void SetViewWantsBestResolution( bool aValue );
+ bool GetViewWantsBestResolution();
+ float GetBackingScaleFactor();
// deprecated methods
// ------------------
diff -ruN wxPython-src-3.0.2.0/include/wx/overlay.h wxPython-src-3.0.2-1.0/include/wx/overlay.h
--- wxPython-src-3.0.2.0/include/wx/overlay.h 2013-12-16 06:42:30.000000000 -0700
+++ wxPython-src-3.0.2-1.0/include/wx/overlay.h 2015-05-20 18:54:34.000000000 -0600
@@ -13,7 +13,7 @@
#include "wx/defs.h"
-#if defined(__WXMAC__) && wxOSX_USE_CARBON
+#if defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON
#define wxHAS_NATIVE_OVERLAY 1
#elif defined(__WXDFB__)
#define wxHAS_NATIVE_OVERLAY 1
diff -ruN wxPython-src-3.0.2.0/include/wx/private/overlay.h wxPython-src-3.0.2-1.0/include/wx/private/overlay.h
--- wxPython-src-3.0.2.0/include/wx/private/overlay.h 2013-12-16 06:42:30.000000000 -0700
+++ wxPython-src-3.0.2-1.0/include/wx/private/overlay.h 2015-05-20 18:54:34.000000000 -0600
@@ -16,7 +16,11 @@
#ifdef wxHAS_NATIVE_OVERLAY
#if defined(__WXMAC__)
+#if wxOSX_USE_CARBON
#include "wx/osx/carbon/private/overlay.h"
+#else
+ #include "wx/osx/cocoa/private/overlay.h"
+#endif
#elif defined(__WXDFB__)
#include "wx/dfb/private/overlay.h"
#else
diff -ruN wxPython-src-3.0.2.0/src/common/translation.cpp wxPython-src-3.0.2-1.0/src/common/translation.cpp
--- wxPython-src-3.0.2.0/src/common/translation.cpp 2014-10-08 10:51:06.000000000 -0600
+++ wxPython-src-3.0.2-1.0/src/common/translation.cpp 2015-05-20 18:56:04.000000000 -0600
@@ -1624,6 +1624,9 @@
/* static */
const wxString& wxTranslations::GetUntranslatedString(const wxString& str)
{
+ // Marco Serantoni - Dirty Patch
+ // Awaiting for http://trac.wxwidgets.org/ticket/15908
+ if( gs_translationsOwned == false) return str;
wxLocaleUntranslatedStrings& strings = wxThreadInfo.untranslatedStrings;
wxLocaleUntranslatedStrings::iterator i = strings.find(str);
diff -ruN wxPython-src-3.0.2.0/src/generic/scrlwing.cpp wxPython-src-3.0.2-1.0/src/generic/scrlwing.cpp
--- wxPython-src-3.0.2.0/src/generic/scrlwing.cpp 2013-12-31 14:48:31.000000000 -0700
+++ wxPython-src-3.0.2-1.0/src/generic/scrlwing.cpp 2015-05-20 18:56:19.000000000 -0600
@@ -214,9 +214,6 @@
return true;
}
- if ( processed && event.IsCommandEvent())
- return true;
-
// For wxEVT_PAINT the user code can either handle this event as usual or
// override virtual OnDraw(), so if the event hasn't been handled we need
// to call this virtual function ourselves.
@@ -235,6 +232,11 @@
return true;
}
+ // If the user code handled this event, it should prevent the default
+ // handling from taking place, so don't do anything else in this case.
+ if ( processed )
+ return true;
+
if ( evType == wxEVT_CHILD_FOCUS )
{
m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event);
diff -ruN wxPython-src-3.0.2.0/src/generic/vscroll.cpp wxPython-src-3.0.2-1.0/src/generic/vscroll.cpp
--- wxPython-src-3.0.2.0/src/generic/vscroll.cpp 2013-12-31 14:48:31.000000000 -0700
+++ wxPython-src-3.0.2-1.0/src/generic/vscroll.cpp 2015-05-20 18:56:19.000000000 -0600
@@ -89,9 +89,6 @@
return true;
}
- if ( processed && event.IsCommandEvent())
- return true;
-
// For wxEVT_PAINT the user code can either handle this event as usual or
// override virtual OnDraw(), so if the event hasn't been handled we need
// to call this virtual function ourselves.
@@ -110,6 +107,11 @@
return true;
}
+ // If the user code handled this event, it should prevent the default
+ // handling from taking place, so don't do anything else in this case.
+ if ( processed )
+ return true;
+
// reset the skipped flag (which might have been set to true in
// ProcessEvent() above) to be able to test it below
bool wasSkipped = event.GetSkipped();
diff -ruN wxPython-src-3.0.2-2.0/src/osx/cocoa/overlay.mm wxPython-src-3.0.2/src/osx/cocoa/overlay.mm
--- wxPython-src-3.0.2-2.0/src/osx/cocoa/overlay.mm 2013-12-16 06:42:31.000000000 -0700
+++ wxPython-src-3.0.2/src/osx/cocoa/overlay.mm 2015-01-30 17:16:50.000000000 -0700
@@ -34,6 +34,7 @@
#include "wx/private/overlay.h"
#ifdef wxHAS_NATIVE_OVERLAY
+#import <Foundation/NSGeometry.h>
// ============================================================================
// implementation
@@ -42,7 +43,6 @@
wxOverlayImpl::wxOverlayImpl()
{
m_window = NULL ;
- m_overlayContext = NULL ;
m_overlayWindow = NULL ;
}
@@ -58,48 +58,6 @@
void wxOverlayImpl::CreateOverlayWindow()
{
- if ( m_window )
- {
- m_overlayParentWindow = m_window->MacGetTopLevelWindowRef();
- [m_overlayParentWindow makeKeyAndOrderFront:nil];
-
- NSView* view = m_window->GetHandle();
-
- NSPoint viewOriginBase, viewOriginScreen;
- viewOriginBase = [view convertPoint:NSMakePoint(0, 0) toView:nil];
- viewOriginScreen = [m_overlayParentWindow convertBaseToScreen:viewOriginBase];
-
- NSSize viewSize = [view frame].size;
- if ( [view isFlipped] )
- viewOriginScreen.y -= viewSize.height;
-
- m_overlayWindow=[[NSWindow alloc] initWithContentRect:NSMakeRect(viewOriginScreen.x,viewOriginScreen.y,
- viewSize.width,
- viewSize.height)
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:YES];
-
- [m_overlayParentWindow addChildWindow:m_overlayWindow ordered:NSWindowAbove];
- }
- else
- {
- m_overlayParentWindow = NULL ;
- CGRect cgbounds ;
- cgbounds = CGDisplayBounds(CGMainDisplayID());
-
- m_overlayWindow=[[NSWindow alloc] initWithContentRect:NSMakeRect(cgbounds.origin.x,cgbounds.origin.y,
- cgbounds.size.width,
- cgbounds.size.height)
- styleMask:NSBorderlessWindowMask
- backing:NSBackingStoreBuffered
- defer:YES];
- }
- [m_overlayWindow setOpaque:NO];
- [m_overlayWindow setIgnoresMouseEvents:YES];
- [m_overlayWindow setAlphaValue:1.0];
-
- [m_overlayWindow orderFront:nil];
}
void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height )
@@ -107,84 +65,49 @@
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
- m_x = x ;
- m_y = y ;
- if ( dc->IsKindOf( CLASSINFO( wxClientDC ) ))
- {
- wxPoint origin = m_window->GetClientAreaOrigin();
- m_x += origin.x;
- m_y += origin.y;
- }
- m_width = width ;
- m_height = height ;
-
- CreateOverlayWindow();
- wxASSERT_MSG( m_overlayWindow != NULL , _("Couldn't create the overlay window") );
- m_overlayContext = (CGContextRef) [[m_overlayWindow graphicsContext] graphicsPort];
- wxASSERT_MSG( m_overlayContext != NULL , _("Couldn't init the context on the overlay window") );
-
- int ySize = 0;
- if ( m_window )
- {
- NSView* view = m_window->GetHandle();
- NSSize viewSize = [view frame].size;
- ySize = viewSize.height;
- }
- else
- {
- CGRect cgbounds ;
- cgbounds = CGDisplayBounds(CGMainDisplayID());
- ySize = cgbounds.size.height;
-
-
-
- }
- CGContextTranslateCTM( m_overlayContext, 0, ySize );
- CGContextScaleCTM( m_overlayContext, 1, -1 );
- CGContextTranslateCTM( m_overlayContext, -m_x , -m_y );
+ m_overlayWindow = m_window->MacGetTopLevelWindowRef();
+
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ if( [m_overlayWindow isVisible] )
+ {
+ [m_overlayWindow discardCachedImage];
+ [m_overlayWindow cacheImageInRect:box];
+ }
}
void wxOverlayImpl::BeginDrawing( wxDC* dc)
{
- wxDCImpl *impl = dc->GetImpl();
- wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl);
- if (win_impl)
- {
- win_impl->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
- dc->SetClippingRegion( m_x , m_y , m_width , m_height ) ;
- }
}
void wxOverlayImpl::EndDrawing( wxDC* dc)
{
- wxDCImpl *impl = dc->GetImpl();
- wxGCDCImpl *win_impl = wxDynamicCast(impl,wxGCDCImpl);
- if (win_impl)
- win_impl->SetGraphicsContext(NULL);
-
- CGContextFlush( m_overlayContext );
}
-void wxOverlayImpl::Clear(wxDC* WXUNUSED(dc))
+void wxOverlayImpl::Clear( wxDC* WXUNUSED(dc) )
{
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") );
- CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 );
- CGContextClearRect( m_overlayContext, box );
+
+ if( [m_overlayWindow isVisible] )
+ {
+ [m_overlayWindow restoreCachedImage];
+// [m_overlayWindow flushWindow];
+ }
}
void wxOverlayImpl::Reset()
{
- if ( m_overlayContext )
- {
- m_overlayContext = NULL ;
- }
-
// todo : don't dispose, only hide and reposition on next run
- if (m_overlayWindow)
+ if (m_overlayWindow && [m_overlayWindow isVisible])
{
- [m_overlayParentWindow removeChildWindow:m_overlayWindow];
- [m_overlayWindow release];
- m_overlayWindow = NULL ;
+ NSRect box = [m_overlayWindow frame];
+ box.origin.x = 0;
+ box.origin.y = 0;
+
+ [m_overlayWindow discardCachedImage];
+ [m_overlayWindow cacheImageInRect:box];
}
}
diff -ruN wxPython-src-3.0.2-2.0/src/osx/webview_webkit.mm wxPython-src-3.0.2/src/osx/webview_webkit.mm
--- wxPython-src-3.0.2-2.0/src/osx/webview_webkit.mm 2013-12-31 14:47:57.000000000 -0700
+++ wxPython-src-3.0.2/src/osx/webview_webkit.mm 2015-01-30 17:17:42.000000000 -0700
@@ -28,7 +28,12 @@
#include "wx/hashmap.h"
#include "wx/filesys.h"
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
+#include <WebKit/WebKitLegacy.h>
+#else
#include <WebKit/WebKit.h>
+#endif
+
#include <WebKit/HIWebView.h>
#include <WebKit/CarbonUtils.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment