# State of a viewport of graphics/graphics

**URL:** <https://racket.discourse.group/t/state-of-a-viewport-of-graphics-graphics/4309>\
**Category:** Questions & Answers\
**Tags:** question\
**Created:** [July 5, 2026, 8:08am UTC](https://racket.discourse.group/t/state-of-a-viewport-of-graphics-graphics/4309 "2026-07-05T08:08:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [July 5, 2026, 8:08am UTC](https://racket.discourse.group/t/state-of-a-viewport-of-graphics-graphics/4309/1 "2026-07-05T08:08:24Z")

</div>

Would it be possible to add a procedure to library graphics/graphics showing the state of a viewport (open, hidden or closed)? When closing a viewport in the title bar (upper right corner)  
while the program is waiting for a mouse-click or a key-press, the program keeps waiting without warning and doing nothing. When a viewport has been closed no such event can be posted. Just issuing a warning when closing a viewport would do as well.

---

<div class="post-metadata">

**Author:** ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)\
**Post date:** [July 7, 2026, 2:42pm UTC](https://racket.discourse.group/t/state-of-a-viewport-of-graphics-graphics/4309/2 "2026-07-07T14:42:09Z")

</div>

Hi @joskoot

This sounds like a bug! And it probably can be fixed.

The first step is to log an issue [Sign in to GitHub · GitHub](https://github.com/racket/racket/issues/new/choose)  
and include a short sample program that demonstrates the issue.

I believe the `graphics/graphics` library is quite limited, and for most purposes you are better off with the default GUI toolkit [The Racket Graphical Interface Toolkit](https://docs.racket-lang.org/gui/index.html)

Is there a reason why you need to use the `graphics/graphics` for your project?

Best regards, and welcome to the Racket Discord,

Stephen

---

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [July 7, 2026, 3:38pm UTC](https://racket.discourse.group/t/state-of-a-viewport-of-graphics-graphics/4309/3 "2026-07-07T15:38:23Z")

</div>

Thanks for your reply. I issued a feature request in racket #5545.
