Skip to content

Commit

Permalink
[ui] fix restore when a dialogbox is displayed while the main window …
Browse files Browse the repository at this point in the history
…is minimized

* Closes #896
  • Loading branch information
pbatard committed Feb 6, 2017
1 parent 54004f7 commit f7b839c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 2.12.1058"
CAPTION "Rufus 2.12.1059"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
Expand Down Expand Up @@ -334,8 +334,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,12,1058,0
PRODUCTVERSION 2,12,1058,0
FILEVERSION 2,12,1059,0
PRODUCTVERSION 2,12,1059,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -352,13 +352,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.12.1058"
VALUE "FileVersion", "2.12.1059"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "� 2011-2017 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.12.1058"
VALUE "ProductVersion", "2.12.1059"
END
END
BLOCK "VarFileInfo"
Expand Down
10 changes: 9 additions & 1 deletion src/stdlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,8 +1751,16 @@ HWND MyCreateDialog(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC

INT_PTR MyDialogBox(HINSTANCE hInstance, int Dialog_ID, HWND hWndParent, DLGPROC lpDialogFunc)
{
INT_PTR ret;
LPCDLGTEMPLATE rcTemplate = GetDialogTemplate(Dialog_ID);
INT_PTR ret = DialogBoxIndirect(hMainInstance, rcTemplate, hMainDialog, lpDialogFunc);

// A DialogBox doesn't handle reduce/restore so it won't pass restore messages to the
// main dialog if the main dialog was minimized. This can result in situations where the
// user cannot restore the main window if a new dialog prompt was triggered while the
// main dialog was reduced => Ensure the main dialog is visible before we display anything.
ShowWindow(hMainDialog, SW_NORMAL);

ret = DialogBoxIndirect(hMainInstance, rcTemplate, hWndParent, lpDialogFunc);
safe_free(rcTemplate);
return ret;
}
Expand Down

0 comments on commit f7b839c

Please sign in to comment.