Modal dialog under Unity does not block menu

Asked by raananb

An application, developed with wxWidgets (2.9.4), which works on Windows,
MacOSX & Ubuntu-Gnome is broken when it is executed under Unity.

Essentially, the application is a wxFrame with a menu, and a menu item
displays a dialog using ShowModal() (see below).

In Ubuntu-Gnome (and Win & MacOSX), the menu is disabled while the
dialog is displayed, which is the expected behavior. Under Unity (Ubuntu
 12.04.1 LTS & 12.10) the menu is not disabled while the dialog is
displayed: each subsequent click on the menu item displays a new dialog
window on top of the former dialog windows. Other active elements
(buttons) on the wxFrame are disabled while the dialog is displayed, as
they should be. The menu should be disabled as well.

Any way around this?

class myFrame: public wxFrame
{
...
}

void myframe::OnMenuitemClick( wxCommandEvent& event )
{
  myDialog* dp = new myDialog(this);

  dp->ShowModal();
}

class myDialog: public wxDialog
{
....
};

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Is it ok in other desktops except Gnome? Try XFCE and others to test...

Revision history for this message
raananb (raanan) said :
#2

The application works as it should with XFCE - menus are disabled as long as the dialog is displayed.

Can you help with this problem?

Provide an answer of your own, or ask raananb for more information if necessary.

To post a message you must log in.