There is no standard protocol for it, either from the X11 ICCCM set , or Install FreeDesktop . Therefore, wm protocolit cannot be used for this. However, you can use the event <Configure>to track all size changes for the window. Please note that if you install it at the top level, you will also receive notifications about all widgets inside this window, so you should check if the event was actually up to the level before acting on it, perhaps like this:
bind $toplvl <Configure> {
if {"%W" eq [winfo toplevel "%W"]} {
ActOnResize %W %w %h [wm attributes %W -zoomed]
}
}
You can also check the attribute -fullscreen.
source
share