mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:19:24 +02:00
win32: applied better patch for PM parent from Tomasz Wieckowski. Issue #18624
git-svn-id: trunk@52298 -
This commit is contained in:
parent
d41a4438c1
commit
3d8cc7c21c
@ -1579,10 +1579,9 @@ const
|
||||
);
|
||||
begin
|
||||
MenuHandle := APopupMenu.Handle;
|
||||
if IsLibrary and (Screen.ActiveCustomForm<>nil) and Screen.ActiveCustomForm.HandleAllocated then
|
||||
WinHandle:=Screen.ActiveCustomForm.Handle
|
||||
else
|
||||
WinHandle:=Win32WidgetSet.AppHandle;
|
||||
WinHandle:=Win32WidgetSet.AppHandle;
|
||||
if (WinHandle=0) and (Screen.ActiveCustomForm<>nil) and Screen.ActiveCustomForm.HandleAllocated then
|
||||
WinHandle:=Screen.ActiveCustomForm.Handle;
|
||||
GetWin32WindowInfo(WinHandle)^.PopupMenu := APopupMenu;
|
||||
TrackPopupMenuEx(MenuHandle,
|
||||
lAlignment[APopupMenu.Alignment, APopupMenu.IsRightToLeft] or lTrackButtons[APopupMenu.TrackButton],
|
||||
|
Loading…
Reference in New Issue
Block a user