diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 6f93b166..6e6b3bf7 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -637,7 +637,7 @@ skipPage: if (!ui_dlg_visible && m_curwnd) { - ShowWindow(hwndDlg, SW_SHOWDEFAULT); // BUGBUG: Why is this here, it does not seem to be required? + ShowWindow(hwndDlg, SW_SHOWDEFAULT); ui_dlg_visible = 1; } diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 1bac4222..44b8f9f3 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -1702,9 +1702,11 @@ static int NSISCALL ExecuteEntry(entry *entry_) #ifdef NSIS_LOCKWINDOW_SUPPORT case EW_LOCKWINDOW: { - // Not using ui_dlg_visible because it is not always in sync and we don't want to risk not painting. + // ui_dlg_visible is 1 or 0, so is parm0. It is used because WM_SETREDRAW will toggle WS_VISIBLE! + // BUGBUG: This has unfortunate consequences when used in + // combination with BringToFront on the first page. // See http://forums.winamp.com/showthread.php?t=397781 for details. - SendMessage(g_hwnd, WM_SETREDRAW, parm0, 0); + SendMessage(g_hwnd, WM_SETREDRAW, parm0 & ui_dlg_visible, 0); if (parm0) InvalidateRect(g_hwnd, NULL, FALSE); break; }