aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-07 19:27:18 -0500
committerDavid Robillard <d@drobilla.net>2023-01-07 20:27:35 -0500
commit14b35ef217f5ee387c4f33b1b24bebb015e18f23 (patch)
tree2e9ea2b44dfc9e3108f1a1c489f6842273404272 /src/internal.c
parent4ad8621ac1d94c8e9cf88f83c46a3a70cd91212b (diff)
downloadpugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.tar.gz
pugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.tar.bz2
pugl-14b35ef217f5ee387c4f33b1b24bebb015e18f23.zip
Replace map/unmap events with more expressive configure events
Diffstat (limited to 'src/internal.c')
-rw-r--r--src/internal.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/internal.c b/src/internal.c
index f1f2e65..5549cbc 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -131,9 +131,9 @@ puglPreRealize(PuglView* const view)
PuglStatus
puglDispatchSimpleEvent(PuglView* view, const PuglEventType type)
{
- assert(type == PUGL_REALIZE || type == PUGL_UNREALIZE || type == PUGL_MAP ||
- type == PUGL_UNMAP || type == PUGL_UPDATE || type == PUGL_CLOSE ||
- type == PUGL_LOOP_ENTER || type == PUGL_LOOP_LEAVE);
+ assert(type == PUGL_REALIZE || type == PUGL_UNREALIZE ||
+ type == PUGL_UPDATE || type == PUGL_CLOSE || type == PUGL_LOOP_ENTER ||
+ type == PUGL_LOOP_LEAVE);
const PuglEvent event = {{type, 0}};
return puglDispatchEvent(view, &event);
@@ -213,22 +213,8 @@ puglDispatchEvent(PuglView* view, const PuglEvent* event)
}
break;
- case PUGL_MAP:
- assert(view->stage >= PUGL_VIEW_STAGE_CONFIGURED);
- if (view->stage != PUGL_VIEW_STAGE_MAPPED) {
- st0 = view->eventFunc(view, event);
- view->stage = PUGL_VIEW_STAGE_MAPPED;
- }
- break;
-
- case PUGL_UNMAP:
- assert(view->stage == PUGL_VIEW_STAGE_MAPPED);
- st0 = view->eventFunc(view, event);
- view->stage = PUGL_VIEW_STAGE_CONFIGURED;
- break;
-
case PUGL_EXPOSE:
- assert(view->stage == PUGL_VIEW_STAGE_MAPPED);
+ assert(view->stage == PUGL_VIEW_STAGE_CONFIGURED);
if (!(st0 = view->backend->enter(view, &event->expose))) {
st0 = puglExpose(view, event);
st1 = view->backend->leave(view, &event->expose);