* Electron version: 1.4.4
* Operating system: Ubuntu 16.04.1 (64bit Lubuntu)

I wrote a code to call `BrowserWindow.destroy()` in `dialog.showMessageBox()`'s callback.
https://github.com/yhatt/electron-playground/blob/terminate-without-quit-events/main.js

It's a simple app to open two windows. When you're about to close, it would expect to close just one window by accepting confirmation. It seems like to work correctly in Windows and macOS.

But in Linux, It will terminate app unexpectedly. In addition, the app events about `quit` will not fire. (includes `before-quit` and `will-quit`) 

This issue would be brought only when passing `browserWindow` as first argument of `dialog.showMessageBox()` (Effects by #6160's change?).

Currently It seems that we can avoid by wrapping with `setTimeout(func, 0)` (e.g. https://github.com/yhatt/marp/pull/112). However I think this approach is not a better way.

atom/browser/ui/message_box_gtk.cc
#include "atom/browser/ui/message_box.h"
#include "atom/browser/browser.h"
#include "atom/browser/native_window_views.h"
#include "atom/browser/unresponsive_suppressor.h"
#include "base/callback.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
#include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
#define ANSI_FOREGROUND_RED   "\x1b[31m"
#define ANSI_FOREGROUND_BLACK "\x1b[30m"
#define ANSI_TEXT_BOLD        "\x1b[1m"
#define ANSI_BACKGROUND_GRAY  "\x1b[47m"
#define ANSI_RESET            "\x1b[0m"
namespace atom {
namespace {
class GtkMessageBox {