diff options
author | David Robillard <d@drobilla.net> | 2023-01-07 19:27:18 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-07 20:27:35 -0500 |
commit | 14b35ef217f5ee387c4f33b1b24bebb015e18f23 (patch) | |
tree | 2e9ea2b44dfc9e3108f1a1c489f6842273404272 /src/win.c | |
parent | 4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b (diff) | |
download | pugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.tar.gz pugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.tar.bz2 pugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.zip |
Replace map/unmap events with more expressive configure events
Diffstat (limited to 'src/win.c')
-rw-r--r-- | src/win.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -576,7 +576,8 @@ handleConfigure(PuglView* view, PuglEvent* event) event->configure.height = (PuglSpan)height; event->configure.style = - ((view->resizing ? PUGL_VIEW_STYLE_RESIZING : 0U) | + ((view->impl->mapped ? PUGL_VIEW_STYLE_MAPPED : 0U) | + (view->resizing ? PUGL_VIEW_STYLE_RESIZING : 0U) | (view->impl->fullscreen ? PUGL_VIEW_STYLE_FULLSCREEN : 0U) | (view->impl->minimized ? PUGL_VIEW_STYLE_HIDDEN : 0U) | (view->impl->maximized ? (PUGL_VIEW_STYLE_TALL | PUGL_VIEW_STYLE_WIDE) @@ -674,17 +675,14 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_SHOWWINDOW: if (wParam) { - handleConfigure(view, &event); - puglDispatchEvent(view, &event); - event.type = PUGL_NOTHING; - RedrawWindow(view->impl->hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_INTERNALPAINT); } - event.any.type = wParam ? PUGL_MAP : PUGL_UNMAP; + view->impl->mapped = wParam; + handleConfigure(view, &event); break; case WM_DISPLAYCHANGE: view->impl->scaleFactor = puglWinGetViewScaleFactor(view); |