mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: don't call TaskDialogIndirect with disabled parent windows (#50078)
This commit is contained in:
@@ -158,7 +158,7 @@ DialogResult ShowTaskDialogWstr(gfx::AcceleratedWidget parent,
|
||||
config.hInstance = GetModuleHandle(nullptr);
|
||||
config.dwFlags = flags;
|
||||
|
||||
if (parent) {
|
||||
if (parent && ::IsWindowEnabled(parent)) {
|
||||
config.hwndParent = parent;
|
||||
config.dwFlags |= TDF_POSITION_RELATIVE_TO_WINDOW;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user