x11rdp: fix warnings and cleanup code