Fix OpenGL + XQuartz + embedded canvas in a color dialog -

delete gl-related things (making a context current) before a window unmapped.