summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Ciccani <klan@users.sourceforge.net>2006-07-30 14:47:51 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-07-11 20:03:34 +0100
commited073c9b6e514acd63707ac88798acc066cdee5c (patch)
treec7f6973d9c3ad2365bce7ae7a3ba35ff55964887
parentb3e18a4dde3ee2fda8a5d21380c428e572446d4e (diff)
downloadglut-ed073c9b6e514acd63707ac88798acc066cdee5c.tar.gz
Clear window's event mask before enabling handled events.
-rw-r--r--src/glut/directfb/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glut/directfb/window.c b/src/glut/directfb/window.c
index 7907c45..c8174d7 100644
--- a/src/glut/directfb/window.c
+++ b/src/glut/directfb/window.c
@@ -155,6 +155,7 @@ __glutCreateWindow( GLboolean fullscreen )
new->window->AttachEventBuffer( new->window, events );
/* enable only handled events */
+ new->window->DisableEvents( new->window, DWET_ALL );
new->window->EnableEvents( new->window, DWET_KEYDOWN | DWET_KEYUP |
DWET_BUTTONDOWN | DWET_BUTTONUP |
DWET_ENTER | DWET_LEAVE |
@@ -331,7 +332,11 @@ __glutDestroyWindow( __GlutWindow *window )
window->surface->Release( window->surface );
if (window->window) {
+#if DIRECTFB_VERSION_CODE >= VERSION_CODE(0,9,26)
+ window->window->DetachEventBuffer( window->window, events );
+#else
window->window->Destroy( window->window );
+#endif
window->window->Release( window->window );
}
else {