win: Fix parent window of dialogs.

This commit is contained in:
Cheng Zhao 2014-07-21 22:10:35 +08:00
parent dd404fb785
commit e4484f0c3e

View file

@ -9,7 +9,7 @@
#include <commdlg.h> #include <commdlg.h>
#include <shlobj.h> #include <shlobj.h>
#include "atom/browser/native_window.h" #include "atom/browser/native_window_views.h"
#include "base/file_util.h" #include "base/file_util.h"
#include "base/i18n/case_conversion.h" #include "base/i18n/case_conversion.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
@ -164,9 +164,9 @@ class FileDialog {
bool Show(atom::NativeWindow* parent_window) { bool Show(atom::NativeWindow* parent_window) {
atom::NativeWindow::DialogScope dialog_scope(parent_window); atom::NativeWindow::DialogScope dialog_scope(parent_window);
// HWND window = parent_window ? parent_window->GetNativeWindow() : NULL; HWND window = parent_window ? static_cast<atom::NativeWindowViews*>(
// FIXME parent_window)->GetAcceleratedWidget() :
HWND window = NULL; NULL;
return dialog_->DoModal(window) == IDOK; return dialog_->DoModal(window) == IDOK;
} }