You absolutely can, but trademarks need to be domain-specific. And the social media platform and the window system don't have much overlap in their respective domains.
Another window system couldn't come along and call itself "X", but a microwave manufacturer very well might be able to.