Skip to content

Commit 827398e

Browse files
committed
Fixed a bug when setting BrowserSettings.animation_frame_rate.
Fixed python 3 compile bug.
1 parent e6f9ebc commit 827398e

7 files changed

Lines changed: 24 additions & 6 deletions

File tree

cefpython/cef1/windows/binaries/cefadvanced.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def CefAdvanced():
5353
appSettings = dict()
5454
appSettings["log_file"] = cefpython.GetRealPath("debug.log")
5555

56+
# LOGSEVERITY_INFO - less debug oput.
5657
# LOGSEVERITY_DISABLE - will not create "debug.log" file.
5758
appSettings["log_severity"] = cefpython.LOGSEVERITY_VERBOSE
5859

cefpython/cef1/windows/binaries/panda3d_.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ def __init__(self):
7070
windowInfo = cefpython.WindowInfo()
7171
windowInfo.SetAsOffscreen(windowHandle)
7272

73+
browserSettings = {"animation_frame_rate": 60}
74+
7375
self.browser = cefpython.CreateBrowserSync(
74-
windowInfo, browserSettings={}, navigateURL="cefsimple.html")
76+
windowInfo, browserSettings, navigateURL="cefsimple.html")
7577
self.browser.SetClientHandler(
7678
ClientHandler(self.browser, self.texture))
7779

@@ -218,6 +220,7 @@ def _saveImage(self):
218220
sys.excepthook = cefpython.ExceptHook
219221
settings = {
220222
"log_file": cefpython.GetRealPath("debug.log"),
223+
# Change to LOGSEVERITY_INFO if you want less debug output.
221224
"log_severity": cefpython.LOGSEVERITY_VERBOSE,
222225
"release_dcheck_enabled": True
223226
}

cefpython/cef1/windows/binaries/pyqt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ def stopTimer(self):
103103
print("QtCore version: %s" % QtCore.qVersion())
104104

105105
sys.excepthook = cefpython.ExceptHook
106-
settings = {"log_severity": cefpython.LOGSEVERITY_VERBOSE, "release_dcheck_enabled": True}
106+
settings = {
107+
# Change to LOGSEVERITY_INFO if you want less debug output.
108+
"log_severity": cefpython.LOGSEVERITY_VERBOSE,
109+
"release_dcheck_enabled": True
110+
}
107111
cefpython.Initialize(settings)
108112

109113
app = CefApplication(sys.argv)

cefpython/cef1/windows/binaries/pyside.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ def stopTimer(self):
121121
print("QtCore version: %s" % QtCore.__version__)
122122

123123
sys.excepthook = cefpython.ExceptHook
124-
settings = {"log_severity": cefpython.LOGSEVERITY_VERBOSE, "release_dcheck_enabled": True}
124+
settings = {
125+
# Change to LOGSEVERITY_INFO if you want less debug output.
126+
"log_severity": cefpython.LOGSEVERITY_VERBOSE,
127+
"release_dcheck_enabled": True
128+
}
125129
cefpython.Initialize(settings)
126130

127131
app = CefApplication(sys.argv)

cefpython/cef1/windows/binaries/wxpython.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def OnExit(self):
9595
if __name__ == '__main__':
9696

9797
sys.excepthook = cefpython.ExceptHook
98-
settings = {"log_severity": cefpython.LOGSEVERITY_VERBOSE, "release_dcheck_enabled": True}
98+
settings = {
99+
# Change to LOGSEVERITY_INFO if you want less debug output.
100+
"log_severity": cefpython.LOGSEVERITY_VERBOSE,
101+
"release_dcheck_enabled": True
102+
}
99103
cefpython.Initialize(settings) # Initialize cefpython before wx.
100104

101105
print('wx.version=%s' % wx.version())

cefpython/cython_includes/cef_platform.pxd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# License: New BSD License.
33
# Website: http://code.google.com/p/cefpython/
44

5+
include "compile_time_constants.pxi"
6+
57
IF UNAME_SYSNAME == "Windows":
6-
from cef_win cimport *
8+
from cef_win cimport CefWindowHandle, CefCursorHandle, CefKeyInfo, CefWindowInfo
79
ELIF UNAME_SYSNAME == "Darwin":
810
from cef_mac cimport *
911
ELIF UNAME_SYSNAME == "Linux":

cefpython/settings.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cdef void SetBrowserSettings(
163163
IF CEF_VERSION == 1:
164164

165165
if key == "animation_frame_rate":
166-
cefBrowserSettings.animation_frame_rate = bool(browserSettings[key])
166+
cefBrowserSettings.animation_frame_rate = int(browserSettings[key])
167167
elif key == "drag_drop_disabled":
168168
cefBrowserSettings.drag_drop_disabled = bool(browserSettings[key])
169169
elif key == "load_drops_disabled":

0 commit comments

Comments
 (0)