Command-W not closing native DialogWindow


I have a custom component derived from PreferencesPanel that has its own method nearly identical to showInDialogBox() but with a single change giving the window a native toolbar:


void MyPreferencesPanel::showInNativeDialogBox(const String& dialogTitle, int dialogWidth, int dialogHeight, Colour backgroundColour)
    setSize(dialogWidth, dialogHeight);
    DialogWindow::LaunchOptions o;
    o.dialogTitle                   = dialogTitle;
    o.dialogBackgroundColour        = backgroundColour;
    o.escapeKeyTriggersCloseButton  = false;
    o.useNativeTitleBar             = true;
    o.resizable                     = false;

The problem I am experiencing is that, when I make that change, then command-W no longer triggers closing the window.  Not that if I set o.escapeKeyTriggersCloseButton = true, then the escape key will successfully close the window, but still not command-W.  And both escape and command-W work when o.useNativeTitleBar = false.  This is using JUCE 3.0.8 on Mac OS X 10.9.5 on a latest generation MacBook Pro (Retina).