win32: make r52296 #b33c0dba1b active only in a library. Issue #18624

git-svn-id: trunk@52297 -
This commit is contained in:
ondrej 2016-05-10 19:38:50 +00:00
parent b33c0dba1b
commit d41a4438c1

View File

@ -1579,7 +1579,7 @@ const
);
begin
MenuHandle := APopupMenu.Handle;
if (Screen.ActiveCustomForm<>nil) and Screen.ActiveCustomForm.HandleAllocated then
if IsLibrary and (Screen.ActiveCustomForm<>nil) and Screen.ActiveCustomForm.HandleAllocated then
WinHandle:=Screen.ActiveCustomForm.Handle
else
WinHandle:=Win32WidgetSet.AppHandle;