From 14b35ef217f5ee387c4f33b1b24bebb015e18f23 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Jan 2023 19:27:18 -0500 Subject: Replace map/unmap events with more expressive configure events --- src/internal.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src/internal.c') 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); -- cgit v1.2.1