backends: X11: Check for supported visual class.

Also strip some trailing whitespaces.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>