Categories
Linux Mastering Development

X server. How to know the screen number application was connected to?

Is it possible to know the X11 screen number the application was connected to?
I know that if NULL is passed to XOpenDisplay, one can obtain the default screen number. But if application was connected to some display with some screen number, how to obtain the number?

For now I parse the display connection string to obtain the screen number. Maybe there are a function for that?

Leave a Reply

Your email address will not be published. Required fields are marked *