server: Use separate helper functions for setting and resetting clipboard windows.