Problem with wx.Overlay/DCOverlay on OS X/Retina

There is a problem with Matplotlib zooming (wx backend) that occurs only on Macs with a Retina display with wx 2.9.x and 3.0.0. The problem has to do with using wx.Overlay to save a copy of a window and restore it using a wx.DCOverlay
& Clear. This is illustrated by that attached code snippet. On a single machine, the same python, etc. it works fine if an external display is used, but on Retina, the Clear() causes the contents to be rescaled a factor of two larger (see pictures).

I’d like to know if this is a problem in wxwidgets or wxpython. It seems to be the former. Can anyone confirm this?

Also, I’d love a suggestion for a workaround, but I can’t even see how to detect if Retina is in use in wx/Classic.

Brian

PastedGraphic-1.png

PastedGraphic-2.png

dc_bug.py (2 KB)