exitfunction
Previously: if the GUI was closed (by pressing x button), the code was still running in the background Now: if x button is pressed (GUI closed), the program stops and exits without errors
Previously: if the GUI was closed (by pressing x button), the code was still running in the background Now: if x button is pressed (GUI closed), the program stops and exits without errors