diff options
author | David Robillard <d@drobilla.net> | 2023-01-10 21:21:59 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-11 03:28:10 -0500 |
commit | a02dd604ff43264757460ca4d87a2dde6ed7bbf0 (patch) | |
tree | 0af34b601c3bc2790228e1f135c2182d5852dac6 /src/mac_cairo.m | |
parent | c33edc9b41ccdd7ec3fe711d3a96002b266106bd (diff) | |
download | pugl-a02dd604ff43264757460ca4d87a2dde6ed7bbf0.tar.gz pugl-a02dd604ff43264757460ca4d87a2dde6ed7bbf0.tar.bz2 pugl-a02dd604ff43264757460ca4d87a2dde6ed7bbf0.zip |
Remove cached frame from view
This was just a source of ambiguity and bugs, since it represented different
things at different times and could become stale. Redundant data is always
trouble, so eliminate it, leaving just two positions/sizes: the defaults (used
when the view is not yet realized), and the last configuration.
Diffstat (limited to 'src/mac_cairo.m')
-rw-r--r-- | src/mac_cairo.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mac_cairo.m b/src/mac_cairo.m index 66af5ba..8e28985 100644 --- a/src/mac_cairo.m +++ b/src/mac_cairo.m @@ -90,8 +90,8 @@ puglMacCairoEnter(PuglView* view, const PuglExposeEvent* expose) CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; - const CGSize sizePx = {(CGFloat)view->frame.width, - (CGFloat)view->frame.height}; + const CGSize sizePx = {(CGFloat)view->lastConfigure.width, + (CGFloat)view->lastConfigure.height}; const CGSize sizePt = CGContextConvertSizeToUserSpace(context, sizePx); |