Get current screen dimensions via Xlib using C

Is there any way to get screen dimensions of a display via Xlib using C? I've tried referring to the X.org docs (https://tronche.com/gui/x/xlib/display/screen-information.html), and it only gives me macros which do not accept integers, so I'm at a loss. https://www.tellpizzahut.online/

I specifically used these functions in this way:

int sx;
int sy;
XWidthOfScreen(sx);
XWidthOfScreen(sy);

...

move_window(sx / 4)
move_window(sy / 4)
I'm a noob to C programming, and am working on my first project
Last edited on
Topic archived. No new replies allowed.