Jeremy Koritzinsky
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
7 deletions
-
native/Avalonia.Native/src/OSX/gl.mm
-
src/Avalonia.Controls/Button.cs
|
|
|
@ -208,9 +208,8 @@ public: |
|
|
|
|
|
|
|
virtual ~AvnGlRenderingSession() |
|
|
|
{ |
|
|
|
glFlush(); |
|
|
|
[_context flushBuffer]; |
|
|
|
[_context setView:nil]; |
|
|
|
[NSOpenGLContext clearCurrentContext]; |
|
|
|
CGLUnlockContext([_context CGLContextObj]); |
|
|
|
[_view unlockFocus]; |
|
|
|
} |
|
|
|
@ -241,9 +240,8 @@ public: |
|
|
|
auto gl = _context; |
|
|
|
CGLLockContext([_context CGLContextObj]); |
|
|
|
[gl setView: _view]; |
|
|
|
[gl update]; |
|
|
|
[gl makeCurrentContext]; |
|
|
|
auto frame = [_view frame]; |
|
|
|
|
|
|
|
*ret = new AvnGlRenderingSession(_window, _view, gl); |
|
|
|
return S_OK; |
|
|
|
} |
|
|
|
|
|
|
|
@ -253,10 +253,8 @@ namespace Avalonia.Controls |
|
|
|
IsPressed = false; |
|
|
|
e.Handled = true; |
|
|
|
|
|
|
|
var hittest = this.GetVisualsAt(e.GetPosition(this)); |
|
|
|
|
|
|
|
if (ClickMode == ClickMode.Release && |
|
|
|
hittest.Any(c => c == this || (c as IStyledElement)?.TemplatedParent == this)) |
|
|
|
this.GetVisualsAt(e.GetPosition(this)).Any(c => this == c || this.IsVisualAncestorOf(c))) |
|
|
|
{ |
|
|
|
OnClick(); |
|
|
|
} |
|
|
|
|