This is consistent with other IM applications. If the contacts (roster) window is open, double-clicking the tray icon closes the window. Similarly, double-click the tray icon when the window is closed, will open it.
I have mentioned this as 4. in this request SPARK-934