# Finding SDL\_Quit with PumpEvents

**URL:** <https://discourse.libsdl.org/t/finding-sdl-quit-with-pumpevents/10107>\
**Category:** SDL Development\
**Created:** [February 5, 2004, 7:56pm UTC](https://discourse.libsdl.org/t/finding-sdl-quit-with-pumpevents/10107 "2004-02-05T19:56:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robinhoode\_at\_babel](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@robinhoode\_at\_babel](https://discourse.libsdl.org/u/robinhoode_at_babel)\
**Post date:** [February 5, 2004, 7:56pm UTC](https://discourse.libsdl.org/t/finding-sdl-quit-with-pumpevents/10107/1 "2004-02-05T19:56:17Z")

</div>

How would I go about using both SDL\_PumpEvents and looking for the SDL  
event SDL\_Quit? Should I somehow find the “X” button on the window and  
check that against the placement of the cursor? This would change  
depending on the window style & OS. I mean, I could just turn off  
PumpEvents when the game isn’t in progress, and ask the user to go to an  
"Idle Mode" before quitting. What’s the best way to do this kinda thing?

-Rob
