wxDialog ShowModal freeze on macOS

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ppsmurf
Earned a small fee
Earned a small fee
Posts: 14
Joined: Tue Jan 22, 2019 9:14 am

wxDialog ShowModal freeze on macOS

Post 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?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDialog ShowModal freeze on macOS

Post 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.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxDialog ShowModal freeze on macOS

Post 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
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDialog ShowModal freeze on macOS

Post by doublemax »

Did you create an application bundle? Just building is not enough under OSX.

https://wiki.wxwidgets.org/WxMac-specif ... e_front.21
Use the source, Luke!
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxDialog ShowModal freeze on macOS

Post 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
Attachments
1.jpeg
1.jpeg (28.3 KiB) Viewed 2361 times
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDialog ShowModal freeze on macOS

Post by ONEEYEMAN »

Hi,
Is you application is MDI-based?

Thank you.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxDialog ShowModal freeze on macOS

Post 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.
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDialog ShowModal freeze on macOS

Post 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.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDialog ShowModal freeze on macOS

Post by ONEEYEMAN »

And also, try the docview sample for the MDI.

Thank you.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxDialog ShowModal freeze on macOS

Post 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
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: wxDialog ShowModal freeze on macOS

Post by cutecode »

hello, I moved to wx3.1.3 and the promlem seems is gon
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
Post Reply