Esme Povirk (@madewokherd) commented about dlls/comdlg32/itemdlg.c:
return E_UNEXPECTED;
+ if (!GetCurrentActCtx(&This->user_actctx)) + ERR("Failed to get current activation context, last error %lx\n", GetLastError()); + + if (!(comdlg32_actctx_state.is_active = ActivateActCtx(COMDLG32_hActCtx, &comdlg32_actctx_state.cookie))) + ERR("Failed to activate activation context, last error %lx\n", GetLastError()); + SetLastError(0); res = DialogBoxParamW(COMDLG32_hInstance, MAKEINTRESOURCEW(NEWFILEOPENV3ORD), parent, itemdlg_dlgproc, (LPARAM)This); This->dlg_hwnd = NULL; + + if (comdlg32_actctx_state.is_active) + if (!DeactivateActCtx(0, comdlg32_actctx_state.cookie))
Chaining if's together like this instead of && is a bit odd. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2068#note_34973