app/internal/window: [macOS] always draw synchronously

Asynchronous draws introduces flickering on resizes.

Fixes #123

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-02 15:07:04 +02:00
parent ff71d0c518
commit 4cb96ccad9
2 changed files with 20 additions and 20 deletions
+5
View File
@@ -114,6 +114,11 @@ CFTypeRef gio_createGLView(void) {
}
}
void gio_setNeedsDisplay(CFTypeRef viewRef) {
NSOpenGLView *view = (__bridge NSOpenGLView *)viewRef;
[view setNeedsDisplay:YES];
}
CFTypeRef gio_contextForView(CFTypeRef viewRef) {
NSOpenGLView *view = (__bridge NSOpenGLView *)viewRef;
return (__bridge CFTypeRef)view.openGLContext;