summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-07-18 14:27:20 -0400
committerDavid Robillard <d@drobilla.net>2015-07-18 14:27:20 -0400
commit2c72fa23e3aad2dc54a65bf3c9635eafa9c8786e (patch)
treeb6b72a218d85968b1568e9689e639cb6f49f211b
parent23ecce9dacf6938391a127f95a8b6eea27ee8fb5 (diff)
Don't dispatch nothing events.
-rw-r--r--pugl/pugl_internal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h
index 993f319..f83f2c7 100644
--- a/pugl/pugl_internal.h
+++ b/pugl/pugl_internal.h
@@ -1,5 +1,5 @@
/*
- Copyright 2012-2014 David Robillard <http://drobilla.net>
+ Copyright 2012-2015 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -250,7 +250,9 @@ puglDecodeUTF8(const uint8_t* buf)
static void
puglDispatchEvent(PuglView* view, const PuglEvent* event)
{
- if (view->eventFunc) {
+ if (event->type == PUGL_NOTHING) {
+ return;
+ } else if (view->eventFunc) {
view->eventFunc(view, event);
}