Patch sent by Andrew Leech in this topic: https://groups.google.com/d/topic/cefpython/2gvlnukJpJ0/discussion I can't test it right now, because wxPython 4.0 installation fails, but the changes do work fine with old wxPython 2.8, so it can be commited safely.