For example, the foobar:0.1
would specify screen 1 of display 0 on the machine named foobar
.
But what does screen number and display number of X server mean in Xlib?
Does it mean that an X server can have many displays, and a display can have many screens, and a screen can have many windows?
"Display" in xlib / x11 protocol terminology is one single connection between client and X server.
"Screen" is actual screen, but things get more complicated here. Each screen has its own root window ( and some more associated properties - physical width/heights, DPI etc ). Because every window on the screen is child of that root window, you can't just move window from one screen to another (all child windows under X11 always clipped by parent). This is one of the reason multiple "screens" as in your question almost never used - most people have multiple monitors configured to be part of one X11 screen using Xinerama/RANDR extensions
To summarise: one display - one connection (if over network, to a port 6000 + display number). Each screen - it's own root window. One client is allowed to have more than one connection to X ( and thus use multiple Display instances )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With