gtk3: make a sample program quit properly