DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit d2033dd45dd78c81b713279331a2d2da6e85a8aa
parent 8b09cdc4a9507afd82f8f9166011d07460df6b36
Author: falkTX <falktx@gmail.com>
Date:   Thu, 16 Oct 2014 22:20:29 +0100

Misc

Diffstat:
Mdgl/src/pugl/pugl_internal.h | 1+
Mdgl/src/pugl/pugl_osx.m | 18+++++++++++-------
2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/dgl/src/pugl/pugl_internal.h b/dgl/src/pugl/pugl_internal.h @@ -80,6 +80,7 @@ puglInit(int* pargc, char** argv) PuglInternals* impl = puglInitInternals(); if (!impl) { + free(view); return NULL; } diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m @@ -24,8 +24,6 @@ #include "pugl_internal.h" -#include <assert.h> - @interface PuglWindow : NSWindow { @public @@ -97,10 +95,11 @@ puglDisplay(PuglView* view) - (BOOL) acceptsFirstMouse:(NSEvent*)e; - (BOOL) isFlipped; +- (BOOL) isOpaque; - (BOOL) preservesContentInLiveResize; - (id) initWithFrame:(NSRect)frame; - (void) reshape; -- (void) drawRect:(NSRect)r; +- (void) drawRect:(NSRect)rect; - (void) cursorUpdate:(NSEvent*)e; - (void) updateTrackingAreas; - (void) viewWillMoveToWindow:(NSWindow*)newWindow; @@ -136,6 +135,11 @@ puglDisplay(PuglView* view) return YES; } +- (BOOL) isOpaque +{ + return YES; +} + - (BOOL) preservesContentInLiveResize { return NO; @@ -143,7 +147,7 @@ puglDisplay(PuglView* view) - (id) initWithFrame:(NSRect)frame { - puglview = nil; + puglview = nil; trackingArea = nil; NSOpenGLPixelFormatAttribute pixelAttribs[16] = { @@ -200,14 +204,13 @@ puglDisplay(PuglView* view) puglview->height = height; } -- (void) drawRect:(NSRect)r +- (void) drawRect:(NSRect)rect { puglDisplay(puglview); glFlush(); glSwapAPPLE(); - // unused - return; (void)r; + [super drawRect:rect]; } - (void) cursorUpdate:(NSEvent*)e @@ -494,6 +497,7 @@ puglDestroy(PuglView* view) PuglStatus puglProcessEvents(PuglView* view) { + [view->impl->glview setNeedsDisplay:YES]; view->redisplay = false; return PUGL_SUCCESS; }