Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 6d35f57

Browse files
committed
The render handler returns 1x1 rectangles when there is no callback defined in the browser
1 parent 37021ec commit 6d35f57

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/handlers/render_handler.pyx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ cdef public cpp_bool RenderHandler_GetRootScreenRect(
4343
cefRect.width = pyRect[2]
4444
cefRect.height = pyRect[3]
4545
return True
46-
else:
47-
return False
48-
else:
49-
return False
46+
cefRect.x = 0
47+
cefRect.y = 0
48+
cefRect.width = 1
49+
cefRect.height = 1
50+
return True
5051
except:
5152
(exc_type, exc_value, exc_trace) = sys.exc_info()
5253
sys.excepthook(exc_type, exc_value, exc_trace)
@@ -70,10 +71,11 @@ cdef public cpp_bool RenderHandler_GetViewRect(
7071
cefRect.width = pyRect[2]
7172
cefRect.height = pyRect[3]
7273
return True
73-
else:
74-
return False
75-
else:
76-
return False
74+
cefRect.x = 0
75+
cefRect.y = 0
76+
cefRect.width = 1
77+
cefRect.height = 1
78+
return True
7779
except:
7880
(exc_type, exc_value, exc_trace) = sys.exc_info()
7981
sys.excepthook(exc_type, exc_value, exc_trace)

0 commit comments

Comments
 (0)