Skip to content

Commit ca1b77d

Browse files
trop[bot]nmggithub
andauthored
fix: don't call TaskDialogIndirect with disabled parent windows (#50191)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Noah Gregory <noahmgregory@gmail.com>
1 parent 3678edf commit ca1b77d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shell/browser/ui/message_box_win.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ DialogResult ShowTaskDialogWstr(gfx::AcceleratedWidget parent,
158158
config.hInstance = GetModuleHandle(nullptr);
159159
config.dwFlags = flags;
160160

161-
if (parent) {
161+
if (parent && ::IsWindowEnabled(parent)) {
162162
config.hwndParent = parent;
163163
config.dwFlags |= TDF_POSITION_RELATIVE_TO_WINDOW;
164164
}

0 commit comments

Comments
 (0)