How do I generate an X11 geometry string using Xlib?

66 Views Asked by At

I know you can parse them using XParseGeometry, but I also need to generate them. Are there any built in or external functions that could do this for me?

I tried to make my own function that does this, but it was ridiculously buggy.

1

There are 1 best solutions below

0
stark On BEST ANSWER

Should be something like:

char buf[42];
sprintf(buf, "%dx%d+%d+%d", width, height, x, y);