This might be a bug in wxPython on Linux. Most of the examples found through google are for Windows. Found
Issue 13240 in wxwidgets tracker, that reports transparent windows not working in some scenarios. I've tested calling SetTransparent before running main loop, but it still didn't work.
I got transparent window with CEF browser working fine in the pygtk_.py example that is available in CEF 31.0. Tested on Ubuntu 12.04. Here is the diff:
--- a/cefpython/cef3/linux/binaries_64bit/pygtk_.py
+++ b/cefpython/cef3/linux/binaries_64bit/pygtk_.py
@@ -94,6 +94,7 @@ class PyGTKExample:
self.mainWindow.set_size_request(width=800, height=600)
self.mainWindow.set_title('PyGTK CEF example')
self.mainWindow.realize()
+ self.mainWindow.set_opacity(0.5)
self.vbox = gtk.VBox(False, 0)
self.vbox.pack_start(self.CreateMenu(), False, False, 0)
@@ -104,6 +105,7 @@ class PyGTKExample:
windowID = int(hexID, 16)
windowInfo = cefpython.WindowInfo()
+ windowInfo.SetTransparentPainting(True)
windowInfo.SetAsChild(windowID)
# Linux requires adding "file://" for local files,
# otherwise /home/some will be replaced as http://home/some