Save buffers when losing focus.
Use srgb colorspace on mac