From d0a461cbcaa5495ed63a70c8d3e53d92f057b503 Mon Sep 17 00:00:00 2001 From: anders_k Date: Wed, 12 Oct 2016 19:31:57 +0000 Subject: [PATCH] Undo Lockwindow Off fix from [r6789] because it caused the taskbar button to become invisible! git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6793 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 2 +- Source/exehead/exec.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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; }