From ff91e837f71bda5e197102f360eeb62fca8b5d6f Mon Sep 17 00:00:00 2001
From: Mohamed Akram <mohd.akram@outlook.com>
Date: Thu, 30 Oct 2025 00:10:20 +0400
Subject: [PATCH] Fix using wxWidgets on macOS

---
 src/gdlwidget.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gdlwidget.cpp b/src/gdlwidget.cpp
index 3794922da..05647384a 100644
--- src/gdlwidget.cpp
+++ src/gdlwidget.cpp
@@ -1413,6 +1413,7 @@ bool GDLWidget::InitWx() {
   // program was called from the command line (and isn't a bundle)
   try{
      wxInitialize();
+     wxGetApp().CallOnInit();
   } catch (...) {return false;}
  //avoid using if no Display is present!
   wxDisplay d;
