mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 11:38:15 +02:00
Fix unassigned Rect value in Cocoa window creation and changed to constant in setlevel call during Cocoa hint window creation
git-svn-id: trunk@43570 -
This commit is contained in:
parent
2868e7ee39
commit
b0287567ee
@ -196,8 +196,7 @@ begin
|
||||
R := CreateParamsToNSRect(AParams);
|
||||
win := TCocoaPanel(win.initWithContentRect_styleMask_backing_defer(R, WinMask, NSBackingStoreBuffered, False));
|
||||
win.enableCursorRects;
|
||||
// TODO: replace numeric constant with Cocoa constant
|
||||
win.setLevel(8);
|
||||
win.setLevel(FormStyleToWindowLevel[fsSystemStayOnTop]);
|
||||
TCocoaPanel(win).callback := TLCLWindowCallback.Create(win, AWinControl);
|
||||
win.setDelegate(win);
|
||||
win.setAcceptsMouseMovedEvents(True);
|
||||
@ -332,6 +331,9 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
R := CreateParamsToNSRect(AParams);
|
||||
R.origin.x := 0;
|
||||
R.origin.y := 0;
|
||||
cnt := TCocoaWindowContent.alloc.initWithFrame(R);
|
||||
|
||||
if (AParams.Style and WS_CHILD) = 0 then
|
||||
@ -348,8 +350,6 @@ begin
|
||||
ns.release;
|
||||
win.setAcceptsMouseMovedEvents(True);
|
||||
|
||||
R.origin.x := 0;
|
||||
R.origin.y := 0;
|
||||
|
||||
cnt.callback := TCocoaWindow(win).callback;
|
||||
win.setContentView(cnt);
|
||||
|
Loading…
Reference in New Issue
Block a user