aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pugl/detail/implementation.c7
-rw-r--r--pugl/detail/types.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c
index 4e1b3de..d7f1413 100644
--- a/pugl/detail/implementation.c
+++ b/pugl/detail/implementation.c
@@ -371,10 +371,7 @@ puglDecodeUTF8(const uint8_t* buf)
static inline bool
puglMustConfigure(PuglView* view, const PuglEventConfigure* configure)
{
- return !view->configured || configure->x != view->frame.x ||
- configure->y != view->frame.y ||
- configure->width != view->frame.width ||
- configure->height != view->frame.height;
+ return memcmp(configure, &view->lastConfigure, sizeof(PuglEventConfigure));
}
void
@@ -398,7 +395,7 @@ puglDispatchEventInContext(PuglView* view, const PuglEvent* event)
if (puglMustConfigure(view, &event->configure)) {
view->eventFunc(view, event);
- view->configured = true;
+ view->lastConfigure = event->configure;
}
} else {
view->eventFunc(view, event);
diff --git a/pugl/detail/types.h b/pugl/detail/types.h
index 71cfda0..e750ca1 100644
--- a/pugl/detail/types.h
+++ b/pugl/detail/types.h
@@ -64,13 +64,13 @@ struct PuglViewImpl {
uintptr_t transientParent;
PuglHints hints;
PuglRect frame;
+ PuglEventConfigure lastConfigure;
int minWidth;
int minHeight;
int minAspectX;
int minAspectY;
int maxAspectX;
int maxAspectY;
- bool configured;
bool visible;
};