x11rdp: refactoring