There are 5 occurrences of HWND_TOPMOST in that module. I don’t think it is a good idea to change all of them. After all, you must have had a good reason to put them there.
I know this hWndInsertAFter parameter may cause problems if not used correctly (like a windows not showing at all). So, I’m not feeling OK about this.
There may be another way of going about this. Maybe you could use HWND_TOPMOST only if project is not being run in the Delphi debugger. That would give the best of both worlds.
So, in the initialization of the acPopupController have code like this:
if System.DebugHook = 0 then hWndInsertAfter := HWND_TOPMOST
else hWndInsertAfter := HWND_TOP