Set or query the state of the window. With no argument, return the current state: one of 'normal', 'iconic', 'withdrawn', 'icon' or, on Windows and macOS only, 'zoomed'. 'iconic' refers to a window that has been iconified, while 'icon' refers to a window serving as the icon for another window (see iconwindow()); the 'icon' state cannot be set. wm_state() is an alias of state().