aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_show_hide.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_show_hide.c')
-rw-r--r--test/test_show_hide.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/test/test_show_hide.c b/test/test_show_hide.c
index a5c8622..6664a1e 100644
--- a/test/test_show_hide.c
+++ b/test/test_show_hide.c
@@ -20,7 +20,6 @@
typedef enum {
START,
REALIZED,
- CONFIGURED,
MAPPED,
EXPOSED,
UNMAPPED,
@@ -49,22 +48,16 @@ onEvent(PuglView* view, const PuglEvent* event)
test->state = REALIZED;
break;
case PUGL_CONFIGURE:
- if (test->state == REALIZED) {
- test->state = CONFIGURED;
+ if (event->configure.style & PUGL_VIEW_STYLE_MAPPED) {
+ test->state = MAPPED;
+ } else {
+ test->state = UNMAPPED;
}
break;
- case PUGL_MAP:
- assert(test->state == CONFIGURED || test->state == UNMAPPED);
- test->state = MAPPED;
- break;
case PUGL_EXPOSE:
assert(test->state == MAPPED || test->state == EXPOSED);
test->state = EXPOSED;
break;
- case PUGL_UNMAP:
- assert(test->state == MAPPED || test->state == EXPOSED);
- test->state = UNMAPPED;
- break;
case PUGL_UNREALIZE:
assert(test->state == UNMAPPED);
test->state = UNREALIZED;