Files
alkane-toolkit/thirdparty/wx-rs/patches/0004-upstream-wx33-fixes.patch
T

26 lines
1.1 KiB
Diff

--- a/cpp_src/wxbridge.cpp
+++ b/cpp_src/wxbridge.cpp
+++ wx-rs-0.2.0-patched/cpp_src/wxbridge.cpp 2026-09-15 13:25:33.482061000 -0600
@@ -124,6 +124,10 @@
MyFrame::MyFrame(const wxString& title, const wxSize& size)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, size)
{
+ // alkane-toolkit patch: upstream left these uninitialized; the 5 ms render
+ // timer then calls garbage in release builds when no canvas is used.
+ render = NULL;
+ handle_events = NULL;
// Needed to get App to catch key events on OSX
inputWin = new wxWindow(this, wxID_ANY,
wxDefaultPosition,
@@ -424,6 +428,10 @@
wxSize s = wxGetApp().frame->GetClientSize();
struct Size sz = {s.x * scale_factor, (s.y + status_bar_height) * scale_factor};
return sz;
+#elif defined(__linux__)
+ // alkane-toolkit patch: wxGTK3 path (upstream only knew Apple vs Windows)
+ wxSize s = wxGetApp().frame->GetClientSize();
+ return Size {(unsigned int)s.x, (unsigned int)s.y};
#else
HWND hwnd = (HWND) wxGetApp().frame->GetHandle();
RECT rect;