Changeset 6802 in orxonox.OLD for trunk/src/lib/event
- Timestamp:
- Jan 28, 2006, 10:20:47 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/event/event_handler.cc
r6771 r6802 52 52 this->keyMapper = NULL; 53 53 this->stateStack = NULL; 54 54 this->eventsGrabbed = false; 55 55 } 56 56 … … 361 361 int EventHandler::eventFilter(const SDL_Event *event) 362 362 { 363 if (event->type == SDL_KEYDOWN && event->key.keysym.sym == SDLK_TAB && SDL_GetKeyState(NULL)[SDLK_LALT]) 364 { 365 printf("Not sending event to the WindowManager\n"); 366 367 EventHandler::getInstance()->grabEvents(false); 368 return 0; 369 } 363 if (likely(EventHandler::getInstance()->eventsGrabbed)) 364 { 365 if (event->type == SDL_KEYDOWN && event->key.keysym.sym == SDLK_TAB && SDL_GetKeyState(NULL)[SDLK_LALT]) 366 { 367 PRINTF(3)("Not sending event to the WindowManager\n"); 368 EventHandler::getInstance()->grabEvents(false); 369 return 0; 370 } 371 } 372 else 373 { 374 if (event->type == SDL_MOUSEBUTTONDOWN) 375 { 376 EventHandler::getInstance()->grabEvents( true); 377 return 0; 378 } 379 } 380 370 381 return 1; 371 382 }
Note: See TracChangeset
for help on using the changeset viewer.