From e4484f0c3e14cf14578318600ebb7e817d94b1fd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 21 Jul 2014 22:10:35 +0800 Subject: [PATCH] win: Fix parent window of dialogs. --- atom/browser/ui/file_dialog_win.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/ui/file_dialog_win.cc b/atom/browser/ui/file_dialog_win.cc index e0754eec98..e0436d96c0 100644 --- a/atom/browser/ui/file_dialog_win.cc +++ b/atom/browser/ui/file_dialog_win.cc @@ -9,7 +9,7 @@ #include #include -#include "atom/browser/native_window.h" +#include "atom/browser/native_window_views.h" #include "base/file_util.h" #include "base/i18n/case_conversion.h" #include "base/strings/string_util.h" @@ -164,9 +164,9 @@ class FileDialog { bool Show(atom::NativeWindow* parent_window) { atom::NativeWindow::DialogScope dialog_scope(parent_window); - // HWND window = parent_window ? parent_window->GetNativeWindow() : NULL; - // FIXME - HWND window = NULL; + HWND window = parent_window ? static_cast( + parent_window)->GetAcceleratedWidget() : + NULL; return dialog_->DoModal(window) == IDOK; }