Change to use wayland functions instead of x functions