Currently `xselection` and `xmultiple_selection` only differ by one member type. It could be worth factoring the common code in a base class.