File 1115-Remove-old-mac-init-code.patch of Package erlang

From 46320cb4a91664f56e9522260ad112435a463bab Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Mon, 8 Feb 2021 12:15:37 +0100
Subject: [PATCH] Remove old mac init code

wxWidgets does it in its init code and it causes harm on newer MacOs's,
i.e. the top-menus doesn't work.

A fix is merged to wxWidgets master branch and will be released as
wxWidgets-3.1.5 until then top menues will not work on mac.

On old macos the old init code in wxWidgets still work and is not
needed in wx driver init.
---
 lib/wx/c_src/wxe_ps_init.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/lib/wx/c_src/wxe_ps_init.c b/lib/wx/c_src/wxe_ps_init.c
index d82d142967..5d19502fbe 100644
--- a/lib/wx/c_src/wxe_ps_init.c
+++ b/lib/wx/c_src/wxe_ps_init.c
@@ -29,19 +29,8 @@
 
 extern OSErr  CPSSetProcessName (ProcessSerialNumber *psn, char *processname);
 
-void * wxe_ps_init() 
+void * wxe_ps_init()
 {
-   ProcessSerialNumber psn;
-   // Enable GUI 
-   if(!GetCurrentProcess(&psn)) {
-      TransformProcessType(&psn, kProcessTransformToForegroundApplication);
-#ifdef  MAC_OS_X_VERSION_10_6
-      [[NSRunningApplication currentApplication] activateWithOptions:
-       (NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
-#else 
-      SetFrontProcess(&psn);
-#endif
-   }
    return (void *) 0;
 }
 
@@ -63,7 +52,6 @@ void * wxe_ps_init2() {
    ProcessSerialNumber psn;
    size_t app_icon_len = 1023;
    char app_icon_buf[1024];
-   char * app_icon;
 
    // Setup and enable gui
    pool = [[NSAutoreleasePool alloc] init];
-- 
2.26.2

openSUSE Build Service is sponsored by