Desktop: Prevent CEF context menu to fix crashing by right-clicking a text field (#3429)

* add dummy context menu handler to prevent some crashes

* some cleanup

correcting cef handler impl names
using std::ffi::c_int
This commit is contained in:
Timon
2025-11-29 00:08:43 +00:00
committed by GitHub
parent bb4516e377
commit 94e5c8fc05
10 changed files with 106 additions and 42 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ impl<H: CefEventHandler> ImplRenderHandler for RenderHandlerImpl<H> {
_dirty_rect_count: usize,
_dirty_rects: Option<&Rect>,
buffer: *const u8,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
width: std::ffi::c_int,
height: std::ffi::c_int,
) {
let buffer_size = (width * height * 4) as usize;
let buffer_slice = unsafe { std::slice::from_raw_parts(buffer, buffer_size) };