fix detect position for root window
fix printing hex values

Signed-off-by: Kostja Stern <KostjaStern@gmail.com>