Skip to content

Commit 41f6de0

Browse files
author
Cong Liu
committed
Make file dialog modal on Windows
The owning window is not properly get on Windows platform, so that file dialog does not block the parent window correctly.
1 parent fc7d058 commit 41f6de0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/browser/file_select_helper.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,8 @@ void FileSelectHelper::RunFileChooserOnUIThread(
397397
FilePath default_file_name = params.default_file_name;
398398
FilePath working_path = params.initial_path;
399399

400-
#if defined(OS_WIN)
401-
gfx::NativeWindow owning_window =
402-
(gfx::NativeWindow)::GetAncestor((HWND)render_view_host_->GetView()->GetNativeView(), GA_ROOT);
403-
#else
404400
gfx::NativeWindow owning_window =
405401
platform_util::GetTopLevel(render_view_host_->GetView()->GetNativeView());
406-
#endif
407402

408403
select_file_dialog_->SelectFile(
409404
dialog_type_,

0 commit comments

Comments
 (0)