Call c code to change icon only when really needed