Skip to content

Commit cd04e7a

Browse files
committed
Disabled plugins in example scripts for Linux, as websites using
Flash will crash the application, it is a known problem in CEF 1 on Linux.
1 parent 356d761 commit cd04e7a

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

cefpython/cef1/linux/binaries/pygtk_.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def __init__(self):
8888
# otherwise /home/some will be replaced as http://home/some
8989
self.browser = cefpython.CreateBrowserSync(
9090
windowInfo,
91-
browserSettings={},
91+
# Flash will crash app in CEF 1 on Linux, setting
92+
# plugins_disabled to True.
93+
browserSettings={"plugins_disabled": True},
9294
navigateUrl="file://"+GetApplicationPath("cefsimple.html"))
9395

9496
# Must be show_all() for VBox otherwise browser doesn't

cefpython/cef1/linux/binaries/wxpython.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ def __init__(self):
7777

7878
windowInfo = cefpython.WindowInfo()
7979
windowInfo.SetAsChild(self.GetGtkWidget())
80-
print("wxpython.py: creating browser in a moment")
8180
# Linux requires adding "file://" for local files,
8281
# otherwise /home/some will be replaced as http://home/some
8382
self.browser = cefpython.CreateBrowserSync(
8483
windowInfo,
85-
browserSettings={},
84+
# Flash will crash app in CEF 1 on Linux, setting
85+
# plugins_disabled to True.
86+
browserSettings={"plugins_disabled": True},
8687
navigateUrl="file://"+GetApplicationPath("cefsimple.html"))
87-
print("wxpython.py: browser created")
8888

8989
# Remains of OS_WIN code:
9090
#self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)

0 commit comments

Comments
 (0)