If Xinerama is in use, try XineramaQueryScreens. Otherwise, you may be able to assume a single screen and use (X)WidthOfScreen
/(X)HeightOfScreen.
(Also see the other answer. It's remotely possible someone is using the old X screen model where your screens are :x.0
, :x.1
, etc.)