changed window-system predicate to more compatible display-graphic-p