# When closing the window

**URL:** <https://discourse.glfw.org/t/when-closing-the-window/410>\
**Category:** support\
**Created:** [January 21, 2007, 12:20am UTC](https://discourse.glfw.org/t/when-closing-the-window/410 "2007-01-21T00:20:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 21, 2007, 12:20am UTC](https://discourse.glfw.org/t/when-closing-the-window/410/1 "2007-01-21T00:20:43Z")

</div>

**nobody** wrote on [Sunday, January 21, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/a79ac87b/#7958):

Hello!  
When pressing the X button to close the glfw window, is it possible to make it not closing it?  
The reason i want it is that i want a confirmation box to show up that asks if i really want to quit 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 21, 2007, 10:36am UTC](https://discourse.glfw.org/t/when-closing-the-window/410/2 "2007-01-21T10:36:28Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, January 21, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/a79ac87b/#7958/0564):

Absolutely. Use the close callback.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 28, 2007, 11:53am UTC](https://discourse.glfw.org/t/when-closing-the-window/410/3 "2007-01-28T11:53:23Z")

</div>

**nobody** wrote on [Sunday, January 28, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/a79ac87b/#7958/e8af):

Ok, but the problem is that the window closes, but the program keeps running… but you can’t see it…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [February 3, 2007, 2:52pm UTC](https://discourse.glfw.org/t/when-closing-the-window/410/4 "2007-02-03T14:52:41Z")

</div>

**nobody** wrote on [Saturday, February 03, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/a79ac87b/#7958/cca3):

Ah, stupid me 😃 It wasnt closed when you had added the callback 🙂 Thanks alot!
