Exchanges handles the situation differently but most of them open trading and deposits at the same time, while making the announcement a few hours before enabling it. The exchange will clearly need to own a good amount of that X coin before opening trades, usually, exchanges participate in ICOs for that.
I have watched this for a long period of time. For example, Binance used to open deposits first just like what most of the other exchanges do, such as OKEX and HUOBI. However, now they just open trading and deposits at the same time (not make the announcement a few hours before the action). So, I am worrying about some kind of inside trading and price manipulation by the exchanges.