fixed window-system switch for terminal/gui specific function calls