Various fixes for X11 Submitted by: Alexander Kabaev <kabaev@gmail.com>
PR: ports/130583 Submitted by: lstewart Reviewed by: KUROSAWA Takahiro <takahiro.kurosawa@gmail.com>