In order to replicate this, you need to change Windows' Performance Options to "Adjust for best performance". I have only tested this in Windows 7.
The following script demonstrates the problem:
If "BringToFront" is used after "LockWindow off" then I don't get the problem (unless I subsequently relock and unlock the window).OutFile "test.exe"
RequestExecutionLevel user
Page license show leave
Function show
BringToFront
LockWindow on
LockWindow off
;System::Call "user32::SendMessage(i,i,i,i)i ($HWNDPARENT, 0x000B, 1, 0)" ;WM_SETREDRAW
;System::Call "user32::InvalidateRect(i,i,i)i ($HWNDPARENT, n, 0)"
FunctionEnd
Function leave
FunctionEnd
Section "dummy"
SectionEnd
The problem has something to do with LockWindow off. If this is used at any time after BringToFront within the same execution (either in onGUIInit or on page show) then the problem occurs.
In the above code I have commented out 2 system calls that are supposed to recreate exactly what LockWindow off does (based on my understanding of the NSIS source). However, when I use the above system calls instead of LockWindow off I do not get the problem.
My guess is something to do with InvalidateRect and repainting occurring out of sequence such that the background/desktop doesn't know that it needs to be repainted. However, I have no idea why the system calls don't recreate the problem and LockWindow off does.
Whilst I have my work around, it is bugging the hell out of me why I don't know the cause of the problem. This may be an NSIS bug, or not, but if I don't know why it happens then I can't be sure it won't happen again.
LockWindow off certainly appears to be doing something to trigger the problem, but I cannot see what, and so I don't want to cry bug until I know what is going on.
Does anyone have any ideas as to what is happening?