It's an often request in the forums to have X button to exit the application. Although having X only closing the window and leaving the app working in the background is the common behavior among IM applications. So this won't change. But we can add an option (disabled by default) to change how X behaves. Say we can add it to Login section in the Preferences, as there is already a setting about how systray icon works:
"Close button (X) shuts down the application"
Ideally it should also be added to default.properties and at some point into Client Control plugin.