mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] fix restore when a dialogbox is displayed while the main window is minimized
* Closes #896
This commit is contained in:
parent
54004f7f6c
commit
f7b839c596
2 changed files with 14 additions and 6 deletions
10
src/rufus.rc
10
src/rufus.rc
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
|
10
src/stdlg.c
10
src/stdlg.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue