I'm trying to use the context menu callbacks with offscreen rendering and am having issues trying to to customize the context menu.
The ContextMenuParams and MenuModel structs being sent to the OnBeforeContextMenu callback are somehow broken, in that getter methods always return 0, and methods for modifying the menu have no effect. In comparison, the Browser and Frame objects being sent to the same callback work perfectly fine. Same is true for the RunContextMenu callback.
For example, params.get_xcoord() and params.get_ycoord() always return 0, as well as params.is_editable() even when a text input field is selected. Also, model.clear() always returns 0, indicating failure.
The context menu widget works fine, in that it displays in the correct location, and the default actions work correctly. Even returning 1 from RunContextMenu has the expected behavior in that the context menu gets suppressed. But I can't read or write to any of the structs that define it.
Full context, I'm using Windows 32-bit build in Dolphin Smalltalk, with offscreen rendering, and multithreaded message loop enabled. The language bindings use the C API, and the FFI for ContextMenuParams structs is defined here: https://github.com/JBetz/Dolphin-CEF/blob/master/Chromium%20Embedded%20Framework/CefContextMenuParams.cls#L519-L586
I've never run into this failure state before so I don't think it's a platform issue. My best guess is that it has something to do with which thread the context menu was created on, but I don't know how to test this theory.