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/win_cairo.c | |
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/win_cairo.c')
-rw-r--r-- | src/win_cairo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/win_cairo.c b/src/win_cairo.c index ddc9554..75c61db 100644 --- a/src/win_cairo.c +++ b/src/win_cairo.c @@ -27,7 +27,7 @@ puglWinCairoCreateDrawContext(PuglView* view) surface->drawDc = CreateCompatibleDC(impl->hdc); surface->drawBitmap = CreateCompatibleBitmap( - impl->hdc, (int)view->frame.width, (int)view->frame.height); + impl->hdc, (int)view->lastConfigure.width, (int)view->lastConfigure.height); DeleteObject(SelectObject(surface->drawDc, surface->drawBitmap)); @@ -126,8 +126,8 @@ puglWinCairoLeave(PuglView* view, const PuglExposeEvent* expose) BitBlt(impl->hdc, 0, 0, - (int)view->frame.width, - (int)view->frame.height, + (int)view->lastConfigure.width, + (int)view->lastConfigure.height, surface->drawDc, 0, 0, |