Clear window's event mask before enabling handled events.
authorClaudio Ciccani <klan@users.sourceforge.net>
Sun, 30 Jul 2006 14:47:51 +0000 (14:47 +0000)
committerClaudio Ciccani <klan@users.sourceforge.net>
Sun, 30 Jul 2006 14:47:51 +0000 (14:47 +0000)
src/glut/directfb/window.c

index 7907c45e67a0f43eb3420a5e8cbaa414922ff9c0..c8174d795e76489b1ef1e4b0fba6cd370047f45e 100644 (file)
@@ -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 {