Skip to content

Commit f1a2b1b

Browse files
committed
fix windows file dialogs needing alt tab in full screen
1 parent 8e461e4 commit f1a2b1b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

loader/src/platform/windows/nfdwin.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,13 @@ Result<> nfdPick(
224224
}
225225
}
226226

227-
switch (dialog->Show(nullptr)) {
227+
auto fgWindow = GetForegroundWindow();
228+
auto taskbar = FindWindow("Shell_TrayWnd", NULL);
229+
SetForegroundWindow(taskbar);
230+
auto dialogResult = dialog->Show(fgWindow);
231+
ShowWindow(fgWindow, SW_RESTORE);
232+
233+
switch (dialogResult) {
228234
case S_OK: {
229235
switch (mode) {
230236
case NFDMode::OpenFile:

0 commit comments

Comments
 (0)