The x-rays aren't just emitted in a single moment, they are the result of the initial core heating up to millions of degrees, so the light they emit just as a result of being hot is in the x-ray and lasts for some amount of time. This is long enough to generate the ionised air which continues to expand and absorb more x-rays until the initial core cools down somewhat. At that point you have a large amount of incredibly hot, incredibly high pressure plasma which then expands and causes the shockwave.