Page 1 of 1

wxDialog ShowModal freeze on macOS

Posted: Tue Jan 22, 2019 3:25 pm
by ppsmurf
Hi,
I'm currently developing dynamic library used in other aplication (aplication has no GUI). In my lib I have used IMPLEMENT_APP_NO_MAIN macro. Lib can show few frames and dialogs.
On Windows everything works fine, but on MacOs some dialog freezes (dialog is visible but not responding).
But It freeze only if there is no top window.

PinDialog* dialog = new PinDialog(pinTypeStr);
dialog->ShowModal();

I realy dont know what might be the problem, can anyone help me please?

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Jan 22, 2019 7:05 pm
by ONEEYEMAN
Hi,
Is main application code available?
Where do you create the dialog?
What OSX version are you testing it on?
How did you compile the library?
So if you create a hidden window and make it a parent of the dialog - it works?
Is dialogs sample works for you?

Thank you.

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 6:05 pm
by cutecode
ppsmurf wrote:
Tue Jan 22, 2019 3:25 pm
Hi,
I'm currently developing dynamic library used in other aplication (aplication has no GUI). In my lib I have used IMPLEMENT_APP_NO_MAIN macro. Lib can show few frames and dialogs.
On Windows everything works fine, but on MacOs some dialog freezes (dialog is visible but not responding).
But It freeze only if there is no top window.

PinDialog* dialog = new PinDialog(pinTypeStr);
dialog->ShowModal();

I realy dont know what might be the problem, can anyone help me please?
did you solve it?
I have the same problem on MAC with wxFrames
The frame shows up only if I click on aplication icon on the tray

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 6:07 pm
by doublemax
Did you create an application bundle? Just building is not enough under OSX.

https://wiki.wxwidgets.org/WxMac-specif ... e_front.21

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 6:43 pm
by cutecode
doublemax wrote:
Tue Feb 19, 2019 6:07 pm
Did you create an application bundle? Just building is not enough under OSX.

https://wiki.wxwidgets.org/WxMac-specif ... e_front.21
yes I did
I have a folder myApp.App with executeable inside it

The problem is, I have main wxFrame and child wxFrames of the main frame.
The main frame is shown on startup correctly. But child frames are not shown on creation.
They show up only if I click on systemtray icon

What ever I tried doesn't help

Code: Select all

			pFrame->Show();
			pFrame->Raise();
			pFrame->SetFocus();
I use wx 3.1.1
mac 10.14.3

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 7:05 pm
by ONEEYEMAN
Hi,
Is you application is MDI-based?

Thank you.

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 7:25 pm
by cutecode
I tried MDI and wxFrames - the same result on both interfaces
Just added this code to wxApp::OnInt()

Code: Select all

#ifdef __WXOSX__
    ProcessSerialNumber PSN;
    GetCurrentProcess(&PSN);
    TransformProcessType(&PSN,kProcessTransformToForegroundApplication);
#endif
that didn't help either.

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 7:43 pm
by doublemax
It should be easy to test if this is a general wxWidgets problem. Modify the minimal sample so that it opens a new frame in MyFrame::OnAbout() instead of showing the version info.

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 7:59 pm
by ONEEYEMAN
And also, try the docview sample for the MDI.

Thank you.

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Feb 19, 2019 8:24 pm
by cutecode
I tried MDI sample and windows are shown up as expected.

I think problem is that, I use wxAUI inside every wxFrame
I'll try wx 3.1.2 later

Re: wxDialog ShowModal freeze on macOS

Posted: Tue Mar 05, 2019 7:55 pm
by cutecode
hello, I moved to wx3.1.3 and the promlem seems is gon