Take a look at Tk::Toplevel
, and Tk::after
. You can set up a callback that runs periodically in your program to check for some of these things, using $toplevel->geometry()
-- this way you can detect when the geometry has changed, or if the user has minimzed or iconfied the application. You can't, unfortunately, directly catch these events as they happen. For that you might want to explore other GUI toolkits that explicitly offer these events as signals.
One question that I would ask is: why? Tk should handle most of your redrawing needs, and I'm not sure it's interesting to know if the user has tried to minimize the window... unless you're trying to coerce certain behavior.