File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
native/Avalonia.Native/src/OSX Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ BEGIN_INTERFACE_MAP()
35
35
ComPtr<IAvnGlContext> _glContext;
36
36
NSObject <IRenderTarget> *renderTarget;
37
37
AvnPoint lastPositionSet;
38
+ bool hasPosition;
38
39
NSSize lastSize;
39
40
NSSize lastMinSize;
40
41
NSSize lastMaxSize;
Original file line number Diff line number Diff line change 29
29
View = [[AvnView alloc ] initWithParent: this ];
30
30
StandardContainer = [[AutoFitContentView new ] initWithContent: View];
31
31
32
- lastPositionSet. X = - 1 ;
33
- lastPositionSet. Y = - 1 ;
32
+ lastPositionSet = { 0 , 0 } ;
33
+ hasPosition = false ;
34
34
lastSize = NSSize { 100 , 100 };
35
35
lastMaxSize = NSSize { CGFLOAT_MAX, CGFLOAT_MAX};
36
36
lastMinSize = NSSize { 0 , 0 };
91
91
CreateNSWindow (isDialog);
92
92
InitialiseNSWindow ();
93
93
94
- if (lastPositionSet. X >= 0 && lastPositionSet. Y >= 0 )
94
+ if (hasPosition )
95
95
{
96
96
SetPosition (lastPositionSet);
97
97
}
384
384
385
385
@autoreleasepool {
386
386
lastPositionSet = point;
387
+ hasPosition = true ;
387
388
388
389
if (Window != nullptr ) {
389
390
[Window setFrameTopLeftPoint: ToNSPoint (ConvertPointY (point))];
You can’t perform that action at this time.
0 commit comments