mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:40:36 +01:00
cocoa: fix SetRealPopup parent - treating window handle as TCocoaWindowContent at all times, rather than NSWindow
git-svn-id: trunk@57657 -
This commit is contained in:
parent
7c5aea5c1e
commit
71098dcffe
@ -757,11 +757,16 @@ end;
|
||||
|
||||
class procedure TCocoaWSCustomForm.SetRealPopupParent(
|
||||
const ACustomForm: TCustomForm; const APopupParent: TCustomForm);
|
||||
var
|
||||
win : NSWindow;
|
||||
begin
|
||||
if Assigned(NSWindow(ACustomForm.Handle).parentWindow) then
|
||||
NSWindow(ACustomForm.Handle).parentWindow.removeChildWindow(NSWindow(ACustomForm.Handle));
|
||||
if not ACustomForm.HandleAllocated then Exit;
|
||||
|
||||
win := TCocoaWindowContent(ACustomForm.Handle).lclOwnWindow;
|
||||
if Assigned(win.parentWindow) then
|
||||
win.parentWindow.removeChildWindow(win);
|
||||
if Assigned(APopupParent) then
|
||||
NSWindow(APopupParent.Handle).addChildWindow_ordered(NSWindow(ACustomForm.Handle), NSWindowAbove);
|
||||
NSWindow( NSView(APopupParent.Handle).window).addChildWindow_ordered(win, NSWindowAbove);
|
||||
end;
|
||||
|
||||
class function TCocoaWSCustomForm.GetClientBounds(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user