diff options
author | David Robillard <d@drobilla.net> | 2020-02-18 22:50:52 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-18 23:20:02 +0100 |
commit | 0059c630d7406f672c113d6dc6da78810160ddbb (patch) | |
tree | 789ede3ed59b6301245b823654e31662adeda726 /pugl/detail/win.c | |
parent | 2bae8905a97aa8a29826c78311c826d61f075e0e (diff) | |
download | pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.gz pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.bz2 pugl-0059c630d7406f672c113d6dc6da78810160ddbb.zip |
Pass expose event to backend enter and leave functions
This is needed for clipping. Unfortunately, the puglEnterContext() and
puglLeaveContext() API was not suitable for this, but this shouldn't matter in
user code because it is only used for setup, and is slated for removal anyway.
Instead, just call the backend functions directly in the implementation.
Diffstat (limited to 'pugl/detail/win.c')
-rw-r--r-- | pugl/detail/win.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c index 6ef9255..1b86d3c 100644 --- a/pugl/detail/win.c +++ b/pugl/detail/win.c @@ -947,9 +947,9 @@ puglSetClipboard(PuglView* const view, } static PuglStatus -puglWinStubEnter(PuglView* view, bool drawing) +puglWinStubEnter(PuglView* view, const PuglEventExpose* expose) { - if (drawing) { + if (expose) { PAINTSTRUCT ps; BeginPaint(view->impl->hwnd, &ps); } @@ -958,9 +958,9 @@ puglWinStubEnter(PuglView* view, bool drawing) } static PuglStatus -puglWinStubLeave(PuglView* view, bool drawing) +puglWinStubLeave(PuglView* view, const PuglEventExpose* expose) { - if (drawing) { + if (expose) { PAINTSTRUCT ps; EndPaint(view->impl->hwnd, &ps); SwapBuffers(view->impl->hdc); |